Cannot handle disconnect events (Glassfish 4.1)

Hi, I'm using asterisk-java version 1.1.0 inside a glassfish environment.
In my code I have a singleton EJB:
@Singleton
@LocalBean
@ConcurrencyManagement(ConcurrencyManagementType.CONTAINER)
@Lock(LockType.READ)
public class TServer implements
        AsteriskServerListener,
        AsteriskQueueListener,
        ManagerEventListener,
        PropertyChangeListener,
        TServerLocal {
  [...]
  // servidores
  private HashMap<String, AsteriskServer> asteriskServers = new HashMap<>();
  [...]
  @Override
  public TServerConnectionStatus connect(String hostname, String username, String password) {
    if (this.asteriskServers.containsKey(hostname)) {
      return this.getConnectionStatus(hostname);
    }
    AsteriskServer asteriskServer = new DefaultAsteriskServer(hostname, username, password);
    asteriskServer.addAsteriskServerListener(this);
    asteriskServer.getManagerConnection().addEventListener(this);
    return this.getConnectionStatus(hostname);
  }
  [...]
}

When I connect to an asterisk server I pass the singleton as listener, all events works perfectly and I have no problem at all, until a disconnection or timeout: when asterisk-java disconnect from the pbx I cannot intercept the event and so I cannot issue a reconnection, instead I start to have errors in the log:
[2017-05-25T16:42:36.804-0300] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=680 _ThreadName=Thread-9] [timeMillis:<PHONE_NUMBER>804] [levelValue: 1000] [[
  Exception in thread "AJ DaemonPool-2.1"]]

[2017-05-25T16:42:36.812-0300] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=680 _ThreadName=Thread-9] [timeMillis:<PHONE_NUMBER>812] [levelValue: 1000] [[
  org.asteriskjava.live.ManagerCommunicationException: Unable to send GetVarAction
        at org.asteriskjava.live.internal.ManagerCommunicationExceptionMapper.mapSendActionException(ManagerCommunicationExceptionMapper.java:60)
        at org.asteriskjava.live.internal.AsteriskServerImpl.sendAction(AsteriskServerImpl.java:957)
        at org.asteriskjava.live.internal.AsteriskChannelImpl.getVariable(AsteriskChannelImpl.java:695)
        at org.asteriskjava.live.internal.ChannelManager.addNewChannel(ChannelManager.java:221)
        at org.asteriskjava.live.internal.ChannelManager.handleNewChannelEvent(ChannelManager.java:494)
        at org.asteriskjava.live.internal.AsteriskServerImpl.onManagerEvent(AsteriskServerImpl.java:1015)
        at org.asteriskjava.manager.ManagerEventListenerProxy$1.run(ManagerEventListenerProxy.java:59)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.asteriskjava.manager.TimeoutException: Timeout waiting for response to GetVar
        at org.asteriskjava.manager.internal.ManagerConnectionImpl.sendAction(ManagerConnectionImpl.java:922)
        at org.asteriskjava.manager.internal.ManagerConnectionImpl.sendAction(ManagerConnectionImpl.java:877)
        at org.asteriskjava.manager.DefaultManagerConnection.sendAction(DefaultManagerConnection.java:311)
        at org.asteriskjava.live.internal.AsteriskServerImpl.sendAction(AsteriskServerImpl.java:953)
        ... 8 more]]

Every subsequent call get "queued" in a "AJ DaemonPool" (I imagine) using 100% of the cpu, until I stop/restart glassfish. I think more threads are spawned while the others are waiting for a timeout, but I don't know if it's as intended and where I can configure how many threads can be launched.
Also I don't understand how I can get notified about the timeout/disconnection or if I'm using the wrong approach.
I think something strange is happening at thread level but as in Glassfish environment I cannot (and shouldn't) control threads directly.

sorry for the late reply, but we would need to see the rest of the stack trace to see what is generating the sendaction.
And when you use asterisk java you will need to understand the threading.
Glassfish will manage the web service threads but the rest are yours to manage.

Sorry for the late response.
I'm not sure what you say about Glassfish, as far I know an application server manage the threading and bean instances, and it's discouraged to manage threads directly to not interfere with the container management, it isn't only a web server. I'm using AJ inside a singleton bean so thread management and concurrency will be managed by glassfish.
The paste above is the stacktrace I have in the log, generally I have this kind of errors when the connection to the pbx is lost, for example because of a network error:
Caused by: org.asteriskjava.live.ManagerCommunicationException: Unable to send CommandAction
        at org.asteriskjava.live.internal.ManagerCommunicationExceptionMapper.mapSendActionException(ManagerCommunicationExceptionMapper.java:60)
        at org.asteriskjava.live.internal.AsteriskServerImpl.sendAction(AsteriskServerImpl.java:957)
        at org.asteriskjava.live.internal.AsteriskServerImpl.executeCliCommand(AsteriskServerImpl.java:776)
        at org.asteriskjava.live.DefaultAsteriskServer.executeCliCommand(DefaultAsteriskServer.java:265)
        at com.tecytal.crm.tyterisk.TServer.isDndActive(TServer.java:460)
        at sun.reflect.GeneratedMethodAccessor1022.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
        at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
        at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4786)
        at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
        at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
        at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)
        at sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
        at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
        at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
        at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
        at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4758)
        at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4746)
        at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
        ... 147 more
Caused by: org.asteriskjava.manager.TimeoutException: Timeout waiting for response to Command
        at org.asteriskjava.manager.internal.ManagerConnectionImpl.sendAction(ManagerConnectionImpl.java:922)
        at org.asteriskjava.manager.internal.ManagerConnectionImpl.sendAction(ManagerConnectionImpl.java:877)
        at org.asteriskjava.manager.DefaultManagerConnection.sendAction(DefaultManagerConnection.java:311)
        at org.asteriskjava.live.internal.AsteriskServerImpl.sendAction(AsteriskServerImpl.java:953)
        ... 178 more
]]

the point is that when this occur I don't receive any event (for example to force disconnection and reconnection) and sometime threads keep sending command and waiting for response.
What is the correct behaviour in case, for example, of a network shortage? How can I detect the loss of connectivity with the PBX?
Thank you

The idea that you don't manage your own threads is correct if you building simple websites that just serve up pages.
As soon as you start talking to a process like asterisk then you are playing in a different league and will need to manage your own threads.
As to the disconnect, asterisk-java will auto reconnect but this will take a number of seconds. You should expect to see a series of errors (such as the one you logged) until the system reconnects.
You should probably monitor the disconnect events emmited by asterisk-java and stop all interaction with asterisk until you get the connect event.

Thank for your reply.
"You should probably monitor the disconnect events emmited by asterisk-java" -> I absolutely agree with you, the point is of this issue as you can see is "cannot handle disconnect event":

I do not receive disconnection events, so I cannot manage when send or not commands
when I send commands to a disconnected PBX I get errors logged like "Actions may only be sent when in state CONNECTED, but connection is in state RECONNECTING" (it's ok, of course) but threads get somewhat stuck, so they start use all cpu and start a thread multiplication: I've ended with more than 200 "AJ DaemonPool" threads

I think it's not normal, I don't know if asterisk-java is not suited to work in an EE environment or if there's a bug, but generating >200 threads and using all cpu time seems a bug to me.

This is the code where I try to catch Disconnection events, maybe this isn't the correct way.
  @Override
  public void onManagerEvent(ManagerEvent event) {
    //
    if (event instanceof DisconnectEvent) {
        [...]
    }
}

the code inside the if is never executed on disconnection.

The connection manager automatically re connects.
The it's no point processing disconnect events because even if you did you
can still send an action just as the system is disconnecting.
So the problem is with your code.
You must always be prepared to handle a failed action.
If your threads are looping its a bug in your code.
Asterisk java is well suited to an ee environment. But your code is going
to need more work.
Have a look are the activities in V2.0
As they provide a high level abstraction for many common asterisk actions.
If your asterisk server is disconnecting a lot you need to check that you
are handling events in a timely manner. If you can't use activities look at
the coherentevent manager as it detaches your thread from the event
receiver which may reduce the no of disconnects. Asterisk will disconnect
you if you don't process events in a timely manner.
There is also a timeout setting in the asterisk manager settings which can
help if you increase it.
On 8 Nov. 2017 5:23 am, "Elettrico"<EMAIL_ADDRESS>wrote:

This is the code where I try to catch Disconnection events, maybe this
isn't the correct way.
@Override
public void onManagerEvent(ManagerEvent event) {
//
if (event instanceof DisconnectEvent) {
[...]
}
}
the code inside the if is never executed on disconnection.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/asterisk-java/asterisk-java/issues/199#issuecomment-342575292,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA29OPHUcEqeq54oey0VJOkbcU3VE1sjks5s0KArgaJpZM4NpcF3
.

I apologize if I sound pedantic, but I'm pretty sure my code is not the problem. Not because I'm the best programmer in the world :) but because I've reduced it to a very basic code and the problem persist.
I do not have loops, I do not generate or manipulate thread in any way. If you've read the pastebin I've pasted above, you can see how AJ DaemonPool threads are growing for every action placed on a disconnected pbx, and of course I'm not creating those threads.
Actually I have a Java EE application with a Singleton EJB and a webservice inside, when the application starts the application server instance the singleton and it connect to asterisk using this very simple method:
public void connect(String hostname, String username, String password) {
	this.asteriskServer = new DefaultAsteriskServer(hostname, username, password);
	this.asteriskServer.addAsteriskServerListener(this);
	this.asteriskServer.getManagerConnection().addEventListener(this);
}

then I've a method for placing a call, this method is called from the webservice:
public String call(String user, String number, int timeout) {
	//
    String context = "from-internal";
    String channelTo = "Local/" + number + "@" + context;
    String channelFrom = "SIP/" + user;
	//
    // originate
    OriginateAction originateAction;
    originateAction = new OriginateAction();
    originateAction.setChannel(channelFrom);
    originateAction.setContext(context);
    originateAction.setPriority(1);
    originateAction.setTimeout(1000L * timeout);
    originateAction.setExten(number);
    originateAction.setCallerId(user);
    try {
		// asteriskServer is the asterisk-java instance
		AsteriskChannel asteriskChannel = this.asteriskServer.originate(originateAction);
		// monitor the resulting channel
		this.monitorChannel(asteriskChannel);
		return asteriskChannel.getId();
    } catch (ManagerCommunicationException | NoSuchChannelException ex) {
		return null;
    }
}

the other methods in the singleton are listening to events but the only thing they actually do is log them.
I cannot simplify more my code (if you see something strange in these lines I'm grateful if you point me at it).
Everything works fine for days or weeks, lot of calls are placed without problem.
I have no disconnection logged, but sometimes apparently the connection goes down, AJ get stuck in "reconnecting" state (and never reconnect, until I manually restart the application) and every originate create an exception in a new AJ DaemonPool thread.
I'm sorry but I haven't found a pattern, sometimes simply is a "bad day" and I have to restart the app two or three times.
I'll try to see if changing timeout or maybe a pingthread can get rid of the disconnection. I hope I can provide more details.

Are you using the very latest verison from 'master'.
There were some race conditions identified recently with reconnects
which master contains fixes for.
Have you done a thread dump to see what the churning threads are doing?
Why are you doing a local dial. Generally we avoid these like the plauge
they are dangerous.
These days we run with about 8 lines of dial plan. Everything else we do
via AGI and Activities.
Did you know you can originate directly into an 'agi'? This is really
powerful and what we used to eliminate dialplan.
Dialplan is also extremely slow. You will handle a much large volume of
calls on a given system if you do everything with agi.
Use an activity instead.
I've just added some additional examples:
https://github.com/asterisk-java/asterisk-java/wiki/Examples
Also read:
https://github.com/asterisk-java/asterisk-java/wiki/Getting-Started
https://github.com/asterisk-java/asterisk-java/wiki/Tutorial
https://github.com/asterisk-java/asterisk-java/wiki/Activities
Activities make everything simpler.
On 08/11/17 08:52, Elettrico wrote:

I apologize if I sound pedantic, but I'm pretty sure my code is not
the problem. Not because I'm the best programmer in the world :) but
because I've reduced it to a very basic code and the problem persist.
I do not have loops, I do not generate or manipulate thread in any
way. If you've read the pastebin I've pasted above, you can see how AJ
DaemonPool threads are growing for every action placed on a
disconnected pbx, and of course I'm not creating those threads.
Actually I have a Java EE application with a Singleton EJB and a
webservice inside, when the application starts the application server
instance the singleton and it connect to asterisk using this very
simple method:
|public void connect(String hostname, String username, String password)
{ this.asteriskServer = new DefaultAsteriskServer(hostname, username,
password); this.asteriskServer.addAsteriskServerListener(this);
this.asteriskServer.getManagerConnection().addEventListener(this); } |
then I've a method for placing a call, this method is called from the
webservice:
|public String call(String user, String number, int timeout) { //
String context = "from-internal"; String channelTo = "Local/" + number

"@" + context; String channelFrom = "SIP/" + user; // // originate
OriginateAction originateAction; originateAction = new
OriginateAction(); originateAction.setChannel(channelFrom);
originateAction.setContext(context); originateAction.setPriority(1);
originateAction.setTimeout(1000L * timeout);
originateAction.setExten(number); originateAction.setCallerId(user);
try { // asteriskServer is the asterisk-java instance AsteriskChannel
asteriskChannel = this.asteriskServer.originate(originateAction); //
monitor the resulting channel this.monitorChannel(asteriskChannel);
return asteriskChannel.getId(); } catch (ManagerCommunicationException
| NoSuchChannelException ex) { return null; } } |

the other methods in the singleton are listening to events but the
only thing they actually do is log them.
I cannot simplify more my code (if you see something strange in these
lines I'm grateful if you point me at it).
Everything works fine for days or weeks, lot of calls are placed
without problem.
I have no disconnection logged, but sometimes apparently the
connection goes down, AJ get stuck in "reconnecting" state (and never
reconnect, until I manually restart the application) and every
originate create an exception in a new AJ DaemonPool thread.
I'm sorry but I haven't found a pattern, sometimes simply is a "bad
day" and I have to restart the app two or three times.
I'll try to see if changing timeout or maybe a pingthread can get rid
of the disconnection. I hope I can provide more details.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/asterisk-java/asterisk-java/issues/199#issuecomment-342634757,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA29ONifl91upxS8RVzty4dzZEPG6swYks5s0NEigaJpZM4NpcF3.

I'm still running version 1.1. It's safe to use master branch in production?
Anyway, I'll try all your suggestions.

closed as no further activity.


bump compat of Setfield to v1.0

This requires a new version of BangBang.jl including https://github.com/JuliaFolds/BangBang.jl/pull/229 to test the new version of Setfield.jl.

@tkf bump

I just released it. Thanks!


fix(grpc): use correct supportedVersions

Which problem is this PR solving?

Fixes #486

Short description of the changes

Change supportedVersions to be 1.*
Move unneeded dependencies to dev dependencies

Codecov Report

Merging #487 into master will increase coverage by 1.33%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master    #487      +/-   ##
=========================================
+ Coverage   94.86%   96.2%   +1.33%
=========================================
  Files         136      79      -57
  Lines        6288    4740    -1548
  Branches      566     436     -130
=========================================
- Hits         5965    4560    -1405
+ Misses        323     180     -143

Impacted Files
Coverage Δ

packages/opentelemetry-plugin-grpc/src/grpc.ts
96.23% <100%> (-0.05%)
:arrow_down:

...pe-async-hooks/test/AsyncHooksScopeManager.test.ts
100% <0%> (ø)
:arrow_up:

...telemetry-plugin-grpc/test/utils/assertionUtils.ts
100% <0%> (ø)
:arrow_up:

...s/opentelemetry-core/test/context/B3Format.test.ts

packages/opentelemetry-core/src/platform/index.ts

.../opentelemetry-core/test/metrics/NoopMeter.test.ts

...metry-core/src/trace/instrumentation/BasePlugin.ts

packages/opentelemetry-web/test/WebTracer.test.ts

...core/src/context/propagation/BinaryTraceContext.ts

...y-plugin-document-load/src/enums/AttributeNames.ts

... and 51 more


Rename modules

It would be nice to have a editor.renameModule(oldName, newName) function. Might be handy when developinf, for wxample a multi tabbed editor where tab name is modue name,

Hi @mcesaro
I point it out to add.
While you can use:
editor.drawflow.drawflow["New_NAME"] = editor.drawflow.drawflow["Other"];
delete editor.drawflow.drawflow["Other"];

Also use if you are in the same module
editor.changeModule("New_NAME");

Jero

Hi @jerosoler, very good suggestions!
I was already using the second method, and in some use cases the first one will work well. Thank you!


fix(fiveam.lisp): Typo in definition of slite/api:rem-test

Thank you, I've merged this PR as https://github.com/tdrhq/slite/commit/91656d51389b396bfc8930cb4396af15e6db64fb


Bug: crash in device=cuda mode

There is a minor bug when non-CPU device is used for torch:
(3/3): Marching cubes
Traceback (most recent call last):
  File "/home/gorbuz/content/TripoSR-Bake/01-mesh.py", line 202, in <module>
    main()
  File "/home/gorbuz/content/TripoSR-Bake/01-mesh.py", line 192, in main
    mesh_result = run_mesh(args, tsr_result, grid_result)
  File "/home/gorbuz/content/TripoSR-Bake/01-mesh.py", line 91, in run_mesh
    .numpy()
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

It's easily fixed by adding .cpu() to line 91 of 01-mesh.py. It's simple enough to fix so I won't submit a PR for it.

Perfect, thanks for reporting! Should be fixed now.


Container list page split personality on Swarm.

Bug description
Container list page (/#/containers) shows containers only from node 1, or node 2 & 3, but not all combined on the same request.  Service list and Stacks list show from node 1, 2, & 3 combined like expected.
Expected behavior
Container list page shows containers from all nodes combined.
Portainer Logs
2020/03/03 08:30:31 Templates already registered inside the database. Skipping template import.
2020/03/03 08:30:31 Instance already has defined endpoints. Skipping the endpoint defined via CLI.
2020/03/03 08:30:31 server: Reverse tunnelling enabled
2020/03/03 08:30:31 server: Fingerprint #######
2020/03/03 08:30:31 server: Listening on <IP_ADDRESS>:8000...
2020/03/03 08:30:31 Starting Portainer 1.22.2 on :9000
2020/03/03 08:30:31 [DEBUG] [chisel, monitoring] [check_interval_seconds: 10.000000] [message: starting tunnel management process]
2020/03/03 08:31:43 http error: Invalid JWT token (err=Invalid JWT token) (code=401)
2020/03/03 08:37:56 http error: Invalid JWT token (err=Invalid JWT token) (code=401)
2020/03/03 08:37:56 http error: Unauthorized (err=Unauthorized) (code=401)
2020/03/03 08:37:57 http error: Unauthorized (err=Unauthorized) (code=401)
2020/03/03 08:37:57 http error: Unauthorized (err=Unauthorized) (code=401)
2020/03/06 11:20:59 http error: Unable to find a webhook with this token (err=Object not found inside the database) (code=404)

Portainer Agent Logs (sometimes this)
2020/03/03 03:11:47 [INFO] [main] [message: Agent running on a Swarm cluster node. Running in cluster mode],
2020/03/03 03:11:50 [INFO] serf: EventMemberJoin: node-2-32936dc5c7fe <IP_ADDRESS>,
2020/03/03 03:11:51 [INFO] serf: EventMemberJoin: node-3-a15e0cb9f027 <IP_ADDRESS>,
2020/03/03 03:11:51 [INFO] [http] [server_addr: <IP_ADDRESS>] [server_port: 9001] [secured: true] [api_version: 1.5.1] [message: Starting Agent API server],
2020/03/03 03:11:52 [INFO] serf: EventMemberJoin: node-1-1c0aecb24ba4 <IP_ADDRESS>,
2020/03/03 03:48:57 [INFO] memberlist: Suspect node-1-1c0aecb24ba4 has failed, no acks received,
2020/03/03 03:48:59 [INFO] memberlist: Suspect node-1-1c0aecb24ba4 has failed, no acks received,
2020/03/03 03:49:01 [INFO] memberlist: Marking node-1-1c0aecb24ba4 as failed, suspect timeout reached (0 peer confirmations),
2020/03/03 03:49:01 [INFO] serf: EventMemberFailed: node-1-1c0aecb24ba4 <IP_ADDRESS>,
2020/03/03 03:49:02 [INFO] memberlist: Suspect node-1-1c0aecb24ba4 has failed, no acks received,
2020/03/03 03:49:11 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:49:31 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:49:54 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:50:06 [INFO] serf: EventMemberReap: node-1-1c0aecb24ba4,
2020/03/03 03:11:48 [INFO] [main] [message: Agent running on a Swarm cluster node. Running in cluster mode],
2020/03/03 03:11:51 [INFO] serf: EventMemberJoin: node-3-a15e0cb9f027 <IP_ADDRESS>,
2020/03/03 03:11:51 [INFO] serf: EventMemberJoin: node-2-32936dc5c7fe <IP_ADDRESS>,
2020/03/03 03:11:51 [INFO] [http] [server_addr: <IP_ADDRESS>] [server_port: 9001] [secured: true] [api_version: 1.5.1] [message: Starting Agent API server],
2020/03/03 03:11:52 [INFO] serf: EventMemberJoin: node-1-1c0aecb24ba4 <IP_ADDRESS>,
2020/03/03 03:49:00 [INFO] memberlist: Suspect node-1-1c0aecb24ba4 has failed, no acks received,
2020/03/03 03:49:01 [INFO] memberlist: Marking node-1-1c0aecb24ba4 as failed, suspect timeout reached (0 peer confirmations),
2020/03/03 03:49:01 [INFO] serf: EventMemberFailed: node-1-1c0aecb24ba4 <IP_ADDRESS>,
2020/03/03 03:49:02 [INFO] memberlist: Suspect node-1-1c0aecb24ba4 has failed, no acks received,
2020/03/03 03:49:21 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:49:51 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:50:04 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:50:06 [INFO] serf: EventMemberReap: node-1-1c0aecb24ba4,
2020/03/03 08:30:00 [INFO] [main] [message: Agent running on a Swarm cluster node. Running in cluster mode],
2020/03/03 08:30:03 [INFO] serf: EventMemberJoin: node-1-5198b26079ba <IP_ADDRESS>,
2020/03/03 08:30:03 [INFO] [http] [server_addr: <IP_ADDRESS>] [server_port: 9001] [secured: true] [api_version: 1.5.1] [message: Starting Agent API server],

Portainer Agent Logs (but sometimes this)
2020/03/03 03:11:48 [INFO] [main] [message: Agent running on a Swarm cluster node. Running in cluster mode],
2020/03/03 03:11:51 [INFO] serf: EventMemberJoin: node-3-a15e0cb9f027 <IP_ADDRESS>,
2020/03/03 03:11:51 [INFO] serf: EventMemberJoin: node-2-32936dc5c7fe <IP_ADDRESS>,
2020/03/03 03:11:51 [INFO] [http] [server_addr: <IP_ADDRESS>] [server_port: 9001] [secured: true] [api_version: 1.5.1] [message: Starting Agent API server],
2020/03/03 03:11:52 [INFO] serf: EventMemberJoin: node-1-1c0aecb24ba4 <IP_ADDRESS>,
2020/03/03 03:49:00 [INFO] memberlist: Suspect node-1-1c0aecb24ba4 has failed, no acks received,
2020/03/03 03:49:01 [INFO] memberlist: Marking node-1-1c0aecb24ba4 as failed, suspect timeout reached (0 peer confirmations),
2020/03/03 03:49:01 [INFO] serf: EventMemberFailed: node-1-1c0aecb24ba4 <IP_ADDRESS>,
2020/03/03 03:49:02 [INFO] memberlist: Suspect node-1-1c0aecb24ba4 has failed, no acks received,
2020/03/03 03:49:21 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:49:51 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:50:04 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:50:06 [INFO] serf: EventMemberReap: node-1-1c0aecb24ba4,
2020/03/03 08:30:00 [INFO] [main] [message: Agent running on a Swarm cluster node. Running in cluster mode],
2020/03/03 08:30:03 [INFO] serf: EventMemberJoin: node-1-5198b26079ba <IP_ADDRESS>,
2020/03/03 08:30:03 [INFO] [http] [server_addr: <IP_ADDRESS>] [server_port: 9001] [secured: true] [api_version: 1.5.1] [message: Starting Agent API server],
2020/03/03 03:11:47 [INFO] [main] [message: Agent running on a Swarm cluster node. Running in cluster mode],
2020/03/03 03:11:50 [INFO] serf: EventMemberJoin: node-2-32936dc5c7fe <IP_ADDRESS>,
2020/03/03 03:11:51 [INFO] serf: EventMemberJoin: node-3-a15e0cb9f027 <IP_ADDRESS>,
2020/03/03 03:11:51 [INFO] [http] [server_addr: <IP_ADDRESS>] [server_port: 9001] [secured: true] [api_version: 1.5.1] [message: Starting Agent API server],
2020/03/03 03:11:52 [INFO] serf: EventMemberJoin: node-1-1c0aecb24ba4 <IP_ADDRESS>,
2020/03/03 03:48:57 [INFO] memberlist: Suspect node-1-1c0aecb24ba4 has failed, no acks received,
2020/03/03 03:48:59 [INFO] memberlist: Suspect node-1-1c0aecb24ba4 has failed, no acks received,
2020/03/03 03:49:01 [INFO] memberlist: Marking node-1-1c0aecb24ba4 as failed, suspect timeout reached (0 peer confirmations),
2020/03/03 03:49:01 [INFO] serf: EventMemberFailed: node-1-1c0aecb24ba4 <IP_ADDRESS>,
2020/03/03 03:49:02 [INFO] memberlist: Suspect node-1-1c0aecb24ba4 has failed, no acks received,
2020/03/03 03:49:11 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:49:31 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:49:54 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:50:06 [INFO] serf: EventMemberReap: node-1-1c0aecb24ba4,

Steps to reproduce the issue:

Go to /#/containers
See error

Technical details:

Portainer version: 1.22.2
Docker version (managed by Portainer): 19.03.6
Platform (windows/linux): Linux
Command used to start Portainer (docker run -p 9000:9000 portainer/portainer):
Browser: Chrome

To me it looks like the agent on node1 is continually being restarted and rejoining the cluster, so you have some form of instability in the cluster. Here is the recommended best practice to avoid agent instability.
You could try and run docker service update <portainer_agent_service_name> --force to see if this fixes things as suggested here. Otherwise you could try redeploying the portainer stack.
I think i'll need some more info on this problem too:

Are you seeing errors in the UI when using Portainer?
Can you change the pagination to All in the UI and see if you can see all containers then

I had restarted it manually on the 3rd, it has been running since then.
Here's an error I get when I try to view logs (depending on which node I hit).
2020/03/03 03:11:47 [INFO] [main] [message: Agent running on a Swarm cluster node. Running in cluster mode],
2020/03/03 03:11:50 [INFO] serf: EventMemberJoin: node-2-32936dc5c7fe <IP_ADDRESS>,
2020/03/03 03:11:51 [INFO] serf: EventMemberJoin: node-3-a15e0cb9f027 <IP_ADDRESS>,
2020/03/03 03:11:51 [INFO] [http] [server_addr: <IP_ADDRESS>] [server_port: 9001] [secured: true] [api_version: 1.5.1] [message: Starting Agent API server],
2020/03/03 03:11:52 [INFO] serf: EventMemberJoin: node-1-1c0aecb24ba4 <IP_ADDRESS>,
2020/03/03 03:48:57 [INFO] memberlist: Suspect node-1-1c0aecb24ba4 has failed, no acks received,
2020/03/03 03:48:59 [INFO] memberlist: Suspect node-1-1c0aecb24ba4 has failed, no acks received,
2020/03/03 03:49:01 [INFO] memberlist: Marking node-1-1c0aecb24ba4 as failed, suspect timeout reached (0 peer confirmations),
2020/03/03 03:49:01 [INFO] serf: EventMemberFailed: node-1-1c0aecb24ba4 <IP_ADDRESS>,
2020/03/03 03:49:02 [INFO] memberlist: Suspect node-1-1c0aecb24ba4 has failed, no acks received,
2020/03/03 03:49:11 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:49:31 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:49:54 [INFO] serf: attempting reconnect to node-1-1c0aecb24ba4 <IP_ADDRESS>:7946,
2020/03/03 03:50:06 [INFO] serf: EventMemberReap: node-1-1c0aecb24ba4,
2020/03/10 03:39:49 [ERROR] [http,docker,proxy] [target_node: node-1] [request: /containers/5198b26079ba411a99c85768e0848438d311cb41d3a8e61d66f28a422089d018/json] [message: unable to redirect request to specified node: agent not found in cluster],
2020/03/10 03:39:49 http error: The agent was unable to contact any other agent (err=Unable to find the targeted agent) (code=500),
2020/03/10 03:40:05 [ERROR] [http,docker,proxy] [target_node: node-1] [request: /containers/5198b26079ba411a99c85768e0848438d311cb41d3a8e61d66f28a422089d018/json] [message: unable to redirect request to specified node: agent not found in cluster],
2020/03/10 03:40:05 http error: The agent was unable to contact any other agent (err=Unable to find the targeted agent) (code=500),
2020/03/10 03:40:06 [ERROR] [http,docker,proxy] [target_node: node-1] [request: /containers/5198b26079ba411a99c85768e0848438d311cb41d3a8e61d66f28a422089d018/json] [message: unable to redirect request to specified node: agent not found in cluster],
2020/03/10 03:40:06 http error: The agent was unable to contact any other agent (err=Unable to find the targeted agent) (code=500),
2020/03/10 03:40:07 [ERROR] [http,docker,proxy] [target_node: node-1] [request: /containers/5198b26079ba411a99c85768e0848438d311cb41d3a8e61d66f28a422089d018/json] [message: unable to redirect request to specified node: agent not found in cluster],
2020/03/10 03:40:07 http error: The agent was unable to contact any other agent (err=Unable to find the targeted agent) (code=500),
2020/03/10 03:40:08 [ERROR] [http,docker,proxy] [target_node: node-1] [request: /containers/5198b26079ba411a99c85768e0848438d311cb41d3a8e61d66f28a422089d018/json] [message: unable to redirect request to specified node: agent not found in cluster],
2020/03/10 03:40:08 http error: The agent was unable to contact any other agent (err=Unable to find the targeted agent) (code=500),
2020/03/10 03:40:08 [ERROR] [http,docker,proxy] [target_node: node-1] [request: /containers/5198b26079ba411a99c85768e0848438d311cb41d3a8e61d66f28a422089d018/json] [message: unable to redirect request to specified node: agent not found in cluster],
2020/03/10 03:40:08 http error: The agent was unable to contact any other agent (err=Unable to find the targeted agent) (code=500),
2020/03/10 03:40:09 [ERROR] [http,docker,proxy] [target_node: node-1] [request: /containers/5198b26079ba411a99c85768e0848438d311cb41d3a8e61d66f28a422089d018/json] [message: unable to redirect request to specified node: agent not found in cluster],
2020/03/10 03:40:09 http error: The agent was unable to contact any other agent (err=Unable to find the targeted agent) (code=500),
2020/03/10 03:40:10 [ERROR] [http,docker,proxy] [target_node: node-1] [request: /containers/5198b26079ba411a99c85768e0848438d311cb41d3a8e61d66f28a422089d018/json] [message: unable to redirect request to specified node: agent not found in cluster],
2020/03/10 03:40:10 http error: The agent was unable to contact any other agent (err=Unable to find the targeted agent) (code=500),

Here are two different version of the tasks list (depending on which node the request hits) on the portainer-agent service.  When it shows the 4 icons next to the task, the logs will link to the container (e.g. /#/containers/a1...aa/logs?nodeName=node-3), but if not, it will link to the task (e.g. /#/tasks/sp...cj/logs).

I think the failed and shutdown are just because of a node reboot, and not what caused this issue.  This issue was present before this as well.
It's interesting to note that both screen seem to agree that the task is in fact running.
When I look at the container log page, the auto-refresh will fail with the message:
{"message":"The agent was unable to contact any other agent","details":"Unable to find the targeted agent"}

Have you done an update of the agent service using --force flag? If not, I definitely recommend this

Otherwise you could try removing each of the containers at a time and have swarm reschedule them or a redeploy of the stack

If the issue still occurs after the above steps, I would look at the swarm configuration to see if this is causing the issues.
I haven't seen this split brain behaviour before, but in my research I found comments saying if you don't have redundancy of managers and you lose quorum this causes issues with swarm. You should then run this command docker swarm init --force-new-cluster to get it to recover

$ docker service update portainer_agent --force fixed it!
I'm pretty sure it wasn't a Swarm issue, but a Portainer issue, because all the other functions of the swarm were working properly, and Portainer was reporting the nodes and services properly for all the nodes (such as the Swarm visualizer).

docker service update portainer_agent --force. didn't resolve same issue. The container on a specific node still cannot be accessed. docker swarm is normal.  Portainer version is 2.6.2.


use strings.Builder instead of bytes.Buffer where applicable

strings.Builder is faster in the cases where the result is used as a string (with bytes.Buffer, the mutable buffer has to be copied to produce an immutable string).

Nice, faster and doesn't change readability~


[Change] Use rel instead of findDOMNode

This allows for testing with jsdom and jest
See: https://github.com/fisshy/react-scroll/issues/185
Another way to solve this is using bindNode (the way this person did: https://github.com/Baransu/react-scroll/commit/5f1708a7dbe0586500c67df1241344c32bb8dd9c)

Awesome! thanks for the PR.

No problem :)


[cgo] Pointer variables are not implemented properly.

Pointer variables are making the headers not compile. We tried to use interface{} style-pointers in order to abstract this for the user, but they seemed to crash.
My suggestion would be to handle pointers strictly as uint64 handles throughout all the go code.
@qmuntal: Do you have any objections?

unsafe.Pointer seems like the right type, but it has to be validated.


Specify more Postman parameters

Name and description of Postman collection can be specified

Codecov Report

Merging #443 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##             master   #443   +/-   ##
=======================================
  Coverage        92%    92%
- Complexity      229    231    +2
=======================================
  Files            11     11
  Lines           550    550
=======================================
  Hits            506    506
  Misses           44     44

Impacted Files
Coverage Δ
Complexity Δ

src/Commands/GenerateDocumentation.php
95.65% <100%> (ø)
36 <0> (ø)
:arrow_down:

src/Postman/CollectionWriter.php
88.88% <100%> (ø)
17 <0> (+2)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 480bc22...14afe07. Read the comment docs.


google authentication: syntax error: sequence truncated

Hi,
I am using the latest master version from the 26-11-2015. I want to use the master version because I am interested with the -google-group support.
Here my command:
  exec  /usr/local/bin/oauth2_proxy -client-id="TEST.apps.googleusercontent.com" -client-secret="TEST" -upstream="http://<IP_ADDRESS>:8081" -cookie-secret="TEST" -email-domain="domain.com" -pass-host-header="true" -cookie-domain="domain.com" -http-address="<IP_ADDRESS>:4180"<EMAIL_ADDRESS><EMAIL_ADDRESS>-google-service-account-json="/opt/testapps.googleusercontent.com.json"

I have the following error when I log in:
<IP_ADDRESS> - - [27/Nov/2015:10:21:19 +0000] stage-internal.domain.com GET - "/oauth2/start?rd=%2F" HTTP/1.0 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36" 302 334 0.000 2015/11/27 10:21:27 google.go:191: error fetching user: Get https://www.googleapis.com/admin/directory/v1/users/arnaud%40domain.com?alt=json: private key should be a PEM or plain PKSC1 or PKCS8; parse error: asn1: syntax error: sequence truncated 2015/11/27 10:21:27 oauthproxy.go:494: <IP_ADDRESS>:48516 ("<IP_ADDRESS>") Permission Denied<EMAIL_ADDRESS>is unauthorized 2015/11/27 10:21:27 oauthproxy.go:316: ErrorPage 403 Permission Denied Invalid Account
Do you have any idea of what can be wrong in my configuration?
If I remove -google-group, -google-admin-email and -google-service-account-json everything works fine.
Thanks.
Arnaud.

private key should be a PEM or plain PKSC1 or PKCS8; parse error: asn1: syntax error: sequence truncated indicates you have an issue validating TLS for www.googleapis.com. Typically this is automatically loaded from one of the files referenced here and is provided by the openssl package.
Can you confirm you have such a file, and that it's valid?

Thanks for your response.
Yes I have the following file /etc/ssl/certs/ca-certificates.crt.
but you right, it seems not valid has it has expired.
/etc/ssl/certs/ca-certificates.crt: C = AT, O = A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH, OU = A-Trust-nQual-03, CN = A-Trust-nQual-03
error 10 at 0 depth lookup:certificate has expired
OK ```

I've tried to use update-ca-certificates but it didn't change the certificate status.

Hi,
I can not find a way to update the following certificate /etc/ssl/certs/ca-certificates.crt.
I am using Linux ip-10-0-101-36 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
I will find another way to manage group.
Thanks for your help.

You can also get this message if the JSON object that you are passing is wrong or is missing the certificate.  It will suggest the certificate is in ARN1 format but it is really missing.


SQLException: Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.

Driver version or jar name
6.3.6-preview
SQL Server version
SQL Server 2008, database schema in server server 2005 compatibility mode
Client operating system
Windows (but this should not matter)
Java/JVM version
1.8 (but this should not matter)
Table schema
any
Problem description
While using class SQLServerDatabaseMetaData the execution of the follwing query in Method getResultSetForForeignKeyInformation(...) leads an exception:
stmt.addBatch("insert into " + foreign_keys_combined_tableName
+ " select " + sys_foreign_keys + ".name, " + sys_foreign_keys + ".delete_referential_action_desc, " + sys_foreign_keys + ".update_referential_action_desc,"
+ fkeys_results_tableName + ".PKTABLE_QUALIFIER," + fkeys_results_tableName + ".PKTABLE_OWNER," + fkeys_results_tableName + ".PKTABLE_NAME," + fkeys_results_tableName + ".PKCOLUMN_NAME,"
+ fkeys_results_tableName + ".FKTABLE_QUALIFIER," + fkeys_results_tableName + ".FKTABLE_OWNER," + fkeys_results_tableName + ".FKTABLE_NAME," + fkeys_results_tableName + ".FKCOLUMN_NAME,"
+ fkeys_results_tableName + ".KEY_SEQ," + fkeys_results_tableName + ".UPDATE_RULE," + fkeys_results_tableName + ".DELETE_RULE," + fkeys_results_tableName + ".FK_NAME," + fkeys_results_tableName + ".PK_NAME,"
+ fkeys_results_tableName + ".DEFERRABILITY from " + sys_foreign_keys
+ " right join " + fkeys_results_tableName + " on " + sys_foreign_keys + ".name=" + fkeys_results_tableName + ".FK_NAME");
Expected behavior and actual behavior
Excected behaviour: query executes without exception and returns foreign key metadata.
Actual behavior:
SQLException: Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
Repro code
I think the problem is that the database server collection is set to SQL_Latin1_General_CP1_CI_AS but the database collection is Latin1_General_CI_A. Since i think my jdbc connection inherits collation setting from database/schema instance. The table fkeys_results_tableName is created with collation Latin1_General_CI_AS but the system table sys.foreign_keys is created with collation SQL_Latin1_General_CP1_CI_AS. Therefore the equal operator in the expression ( sys_foreign_keys + ".name=" + fkeys_results_tableName + ".FK_NAME") can not be executed without additions.
Proposed fix: adding suffix " collate database_default" to sql query like this:
... sys_foreign_keys + " right join " + fkeys_results_tableName + " on " + sys_foreign_keys + ".name=" + fkeys_results_tableName + ".FK_NAME" + " collate database_default"
In my tests this resolved the issue.

Hi @cheenamalhotra,
I'm running into the same issue but I don't fully understand the response to the ticket.
I do understand that a client is responsible for handling collation stuff, but that's quite hard to do when the driver constructs and executes the filter.
The fix that @thfranken proposes is a fix in how the query is constructed in the driver (com.microsoft.sqlserver.jdbc.SQLServerDatabaseMetaData).

Hi @nvdweem
I rechecked SQLServerDatabaseMetaData and yes the fix is for the temporary tables created by driver so needs to be fixed in the driver. I think I mixed it with external queries. Re-opening the issue, we'll work on fix for all related queries in the same class that are possibly likely to cause this exception.
Thanks for correction.

+1

Hi @thfranken @nvdweem @tjlee, we recently had to change that part of the driver and thought now would be a good time to address this issue. I'm adding the solution to this issue along with the PR addressing #665. You test the changes by cloning the branch from PR #677 or downloading the jars below.
Jars for testing.zip

@rene-ye I can't reproduce the issue anymore with the latest provided jars.

I see that you're working on the getResultSetForForeignKeyInformation code--I just reported another related bug at https://github.com/Microsoft/mssql-jdbc/issues/681 .

#677 has now been merged. Closing the issue.


LNK2019 error

I have written this simple code:
#include <iostream>
#include <tuple>
#include <complex>
#include "xtensor/xarray.hpp"
#include "xtensor/xio.hpp"
#include "xtensor/xmath.hpp"
#include "xtensor/xview.hpp"
#include "xtensor/xcomplex.hpp"
#include "xtensor/xoperation.hpp"
#include "xtensor-blas/xlinalg.hpp"

using namespace std;
using namespace xt;

xarray<double> nxn_array(unsigned int);

int main()
{
	auto test = nxn_array(3); //array w/ values that go from 1 to 9
	auto test1 = ones_like(test);
	xarray<complex<double>> eig = linalg::eigvals(test1);
        return 0;
}

And it is outputting the linker error:
Error	LNK2019	unresolved external symbol _dgeev_ referenced in function "int __cdecl cxxlapack::geev<int>(char,char,int,double *,int,double *,double *,double *,int,double *,int,double *,int)" (??$geev@H@cxxlapack@@YAHDDHPANH000H0H0H@Z)	FileName C:\...\FileName\FileName\FileName.obj	1

I don't really know anything about linker errors so I'm not really sure how to resolve this issue.

You need to link your program with an implementation of blas. I recommend using openblas.

Alright, I'll see if I can figure out how to do that. Thanks.


filesystem/external_programs/* doesn't really work on macOS

Tested versions
Reproducible in: 4.3.beta [ec02d406ca0b9c822addff49cf58e9a72cf74eb0]
System information
macOS 13.6.7
Issue description
When trying to use the filesystem/external_programs/* editor settings on macOS, like for example filesystem/external_programs/raster_image_editor, there are several issues currently:

When clicking the button next to the setting you're met with a dialog to pick a file, whereas applications on macOS are folders (*.app) (generally located in /Applications) making you have to dig through the *.app folder to look for the relevant binary, of which there may be several.
Even if you point the setting to the appropriate *.app folder, for example /Applications/Adobe Photoshop 2024/Adobe Photoshop 2024.app, it'll open Photoshop when executing the "Open in External Program" action in the FileSystem dock, but it won't actually open the desired file within Photoshop. This is true even if you point the setting to the actual binary within the *.app folder as well.

Note that the second problem doesn't manifest with all applications. Things seem to work fine with Krita for example, but not with Photoshop. Either way, I believe the idiomatic way of opening applications like this on macOS is using /usr/bin/open (which seems to work fine) as opposed to the traditional Unix-style invocation.
It seems to me that the following changes need to be made:

Change these settings to use PROPERTY_HINT_GLOBAL_DIR on macOS.
Ideally have the dialog open in /Applications right away, if possible.
Open the application using open /Applications/Some.app --args /Path/To/File rather than /Applications/Some.app /Path/To/File.

Also note that just using "Open in External Program" without having these settings assigned works fine, as that goes through OS_MacOS::shell_open rather than OS_Unix::create_process, but that requires having assigned the program as the default in macOS, which may not be desirable.
Steps to reproduce

Open any project with a raster image file in it.
Go to "Editor Settings" > "FileSystem" > "External Programs".
Point "Raster Image Editor" to Photoshop (e.g. /Applications/Adobe Photoshop 2024/Adobe Photoshop 2024.app).
Right-click a raster image file in the FileSystem dock.
Click "Open in External Program".
Note how Photoshop launches.
Note how the file itself doesn't open in Photoshop.

Minimal reproduction project (MRP)
N/A

After checking with @bruvzg it seems that the more appropriate fix for this would be to:

Change Godot's file picker to be able to pick bundles (e.g. *.app folders) as well, possibly through a new property.
Have the application be launched using some new OS method, which on macOS would use the NSWorkspace method openURLs:withApplicationAtURL instead.

I'm assuming the change to the file picker should still allow for navigating into the bundle in some way, when necessary, similar to the "Show Package Contents" context action in Finder.

I agree that NSWorkspace is definitely the way to go with all interactions like this where you want to open files in other applications.

Change Godot's file picker to be able to pick bundles (e.g. *.app folders) as well, possibly through a new property.

Regarding the picking of bundles this might be easier to implement via the native file pickers, for example on macOS where these will show and allow .app bundles to be selected as files rather than folders. Similarly other native file pickers might have appropriate modes where you can select applications in the formats they have on that platform.

Regarding the picking of bundles this might be easier to implement via the native file pickers

Using the native file pickers is already a thing through the interface/editor/use_native_file_dialogs editor setting (which is disabled by default) so support for this would likely need to be added to Godot's own file picker anyway.


Add l1_norm() for Signed

Hi,
This adds the abs method for the FloatCore trait.
as far as I understand it there is no way to get the absolute value/norm of a complex number using no_std. with this method it should be possible to get absolute value with no_std.
let me know if you fine with the name abs() or want it to be norm() as pointed out in #38
The motivation is to be able to make https://github.com/schultzer/blas-rs compile with no_std.
/edit
This is actually "The 1-norm is simply the sum of the absolute values of the columns"

I've updated the pr and change the name of the issue accordingly to the name change to l1_norm() and for Signed

bors r+


Problems with inputing OpenAI key to DevChat key

Now, the Input DevChat Access Key command can accept an OpenAI API Key, but it should be reported as a format error. Let's separate them, rather than mix them, for clarity. Otherwise, we may see the following inconsistent problems.

Apparently, Claude-2 cannot use OpenAI API Key.

Actually, it doesn't work even if choosing a GPT model.

在DevChat key设置时，进行了KEY的简单验证。在使用openai key进行设定时，没有进行key验证，主要是有第三方代理key的可能。


1.20.1 Crash

Hello, I am getting a crash trying to get in to my modpack. It is a pretty generic crash log from the looks of it but I removed adv reborn from the pack and it ran. Here is the crashlog, thanks!
crash-2024-02-18_12.08.37-client.txt

thanks for your reporting! fixed from 1.2.6

Updated to latest version 1.2.6 and still crashed, Here is the new crashlog
crash-2024-02-21_10.25.44-client.txt

Please update MCPitanLib too.


Deployment to Production in centOS server

Hi,
We are trying to deploy the expressjs app to the linux server. We have copied the project folder to the OS.We have installed node and npm also.
We have copied the node_modules(created by running npm i --production with in our local system and then copied the corresponding folder to the linux environment).
when we try to run node index.js command, we are getting below error:
Error: Cannot find module 'express'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/ctiapp/whistle/wbbe/index.js:1:77)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)

Someone please help us in deployment of expressjs app within linux server please.!
Thanks and Regards,
Kishore Kumar. K

Hi @kishoreaoe sorry you're having problems. For a quicker response you may wan to stop by our support channel https://gitter.im/expressjs/express vs using the bug tracker.
As for your issue, it's hard to really say without getting the exact steps to reproduce. Can you provide the following?

Version of Node.js
Version of Express.js and any other modules used
A complete app (doesn't have to be your exact app, just one we can use as part of the reproduction) to use to reproduce the issue.
Complete instructions for how to reproduce the above error given the app in (3).

Thank you!

Dear @dougwilson , thanks for the prompt response, I could able to resolve problem by following below steps.

Run npm install --production for the package.json of my node-expressjs app.
copy the node_modules and move to the centOS project folder.
run the index.js (my file to execute).

Could you please tell me any place or location for deployment of expressjs app to production. Because i am not sure whether what i have done is a good practise or not.! ( Is there any way to compress and convert to dist folder and deploying the same in production)

Hi @kishoreaoe thanks for that information. That sounds like the right steps.

thanks @dougwilson , will close this 👍


Include link to virtual playing web site

Added a link to the virtual playing web site so people can always get the latest version.

Nothing wrong with link in the page title, but the table with download links is one Virtual Playing Orchestra update away from having broken links. So I thought it would be a good idea to remind people to visit the web site to ensure they get the latest version, right where they see the download links. Also, the link for the .wav files is circumventing my attempt to spread the bandwidth across 3 file storage locations. On my download page, each visitor is randomly presented with one of the 3 file storage links so I'm less likely to overwhelm the bandwidth of any one source, though I guess realistically this one link on this page probably won't be a huge factor.
Having said all that, I am grateful to see someone spreading the word about my sample library.

I see, thank you. So I might merge this and change the download links to point them to http://virtualplaying.com/virtual-playing-orchestra/#download if it's OK?

Sure. That would be ok. Your suggested change is fine. The only small issue, and I'm not going to make a fuss about this, is that by linking directly to the #download anchor on the Virtual Playing Orchestra page, visitors won't see the buttons at the top of my download page with links to all the other information such as "requirements", "installation", "how to use" etc.
But, like I said, not a big deal.  :-)


Fixer Proposal

It would be good to have a fixer to change:
<?php

function foo($baz)
{
    if ($baz) {
        var_dup('baz was truthy');
    }
    var_dup('hi there');
}

into:
<?php

function foo($baz)
{
    if ($baz) {
        var_dup('baz was truthy');
    }

    var_dup('hi there');
}

-> #1122

Closing as duplicate ;)

LOL. Duplicated myself.


Add some utilities back to vscode image

Wrapping up a loose end I forgot to include with #2704; apt-installing a few utilities that were included in the old image and might be useful in the context of development (especially git). I'm being more selective than the true code-server because I'd like to minimize the risk of issues with esoteric images, and not all of the utilities included in the code-server image seemed relevant (e.g. it also installed vim and nano which seems unnecessary if the whole point is to provide vscode).

@prbot approve

@prbot automerge


derive_ser: Fix clippy::use_self on enum

When deriving Serialize for an enum use Self instead of the enums name to prevent clippy from throwing
clippy::use-self.
An example which represents the issue is temporarily available here: https://git.onders.org/finga/clippy_test.

@dtolnay do you need something else for this PR to be merged ?


Fix study guidance group crashing when fetching population without rights for some students

https://oodikone.helsinki.fi/studyguidancegroups/otm-75c82025-60f3-4390-be1e-9586d1e3567a

This  is a study guidance group for user mehaveri, name SOTE-RYHMÄ. Problem is that group contains only one student and user doesn't have rights to access that students information. Check what to do, access to student / error message to user?


Missing Google Analytics when set in config.yaml

In the config.yaml you have a way to enable a Google Analytics Tracking ID. I set this but it wasn't showing up. I hardcoded it into the header partial of the theme for now.
config.yaml
  # Enable Google Analytics
  googleAnalytics: UA-XXXXXXXX

Putting my google analytics UA in the config.yaml worked for me. People looking at my site show up in my analytics.

Strange, I can't even find that snippet via the Chrome Dev Tools. It's not in the <head>

@oscarmrom are you still facing this issue? If not, please close this.

Feel free to reopen if you still feel this issue.


preparation for version 0.5

[ ] add signup for mailing list on documentation site

gitter? a la https://gitter.im/cvxgrp/cvxpy

timing question -- when should this get reviewed / merged?

This will be the branch that carries the pypi-uploaded version into master, so it'll be the last to be reviewed and merged!

@bqpd, can you try to clean up the figures in http://gpkit.readthedocs.io/en/latest/gpkit101.html prior to release? They're out of date.
Since we're linking to the docs in our release e-mail, I'm expecting a number of users might get inspired to read the docs top-to-bottom; it would be good if this section were in better shape.

@whoburg, the only error I can see in the diagrams is the use of step() instead of gp() in the last one. The whole section needs to be rewritten to emphasize our glorious constraintsets, but I don't think that'll happen before v0.5...I'll make the issue.

loving 1347b3c164705a69339545e182aa6c1884b35d40.
I'll review this tomorrow morning (or when ready, whichever is later)

@whoburg, ready for review. Passes install tests except for a MOSEK bug on Windows 10x64, which is in process of being debugged...

Looks like the new version of gpkit has problems with the pip cache again. It's somewhat sporadic though so I don't understand it...

hmm, I'll test something.

just uploaded v0.5.01 to pypi, removing change to build.py that @whoburg
raised doubts about.

You know you really should use https://testpypi.python.org/pypi. That way you don't end up pushing multiple versions to the official site just to sort out these bugs.

We can setup jenkins to work with the testing site as well.

I fired off a couple of extra builds just to make sure that fixed things. Does this patch now only exit on your computer or is it in this PR as well?

Looks like @whoburg was right about that causing potential build issues! Funny it didn't affect the tests... Pushing up another change.

The tests don't go through the same kind of install/unistall/install/uninstall/install process that the gpkit_install does. It does that to make sure things are working with the pip cache, but that seems to have found this other bug as well.

It's in the PR as well now.

@whoburg, ready for review

another issue: when I run the unit tests from an ipython session (%run gpkit/tests/run_tests.py), I get a modified docs/source/examples/relaxation_output.txt:
diff --git a/docs/source/examples/relaxation_output.txt b/docs/source/examples/r
index 7cace9f..63e2d97 100644
--- a/docs/source/examples/relaxation_output.txt
+++ b/docs/source/examples/relaxation_output.txt
@@ -25,7 +25,7 @@ Free Variables
 --------------
 x : 1.414

-  | Relax.2
+  | Relax.4
 C : 1.414

 Constants
@@ -56,7 +56,7 @@ Free Variables
 --------------
 x : 1

-  | Relax.3
+  | Relax.5
 C : [ 1         2        ]

 Constants
@@ -95,7 +95,7 @@ Free Variables
 x_max : 1
 x_min : 1

-      | Relax.4
+      | Relax.6
 x_max : 1
 x_min : 2

Strange that the modified examples isn't showing up in jenkins. Are you running with cvxopt or mosek?

I have both installed but mosek is default, listed first in gpkit/env/settings.

the changed output also occurs when I run python -c "from gpkit.tests import run; run()"

That's normal and good! Now that we print the modelnums, we can see them accumulate in an interactive environment. Any non-interactive use (such as the tests) will remain deterministic.

but I'm saying that on my computer, running the tests in a non-interactive environment (via python -c "from gpkit.tests import run; run()") results in changing the output files, which seems not normal and not good.

Hmm! That might be because you have a different number of solvers installed? Do you also get changed output with fulltests.sh but not with runtests.sh?


Plot data distribution

New plot of the data/ground truth distribution based on the one made by @bowni for the reference scenarios.
Changes :

The figure was entirely rebuilt with seaborn.
We can visualize both the real ground truth distribution and the corrupted one if there is any corrupted partner.
We can now display the plot after the scenario creation.
The plots were added in the notebook of the reference scenarios.
The code is divided into two parts, one in the Scenario class and the other one (more independent) in utils. But is it really relevant? I'm not sure whether it can be reused for something else or not.
The documentation was updated.

Codecov Report

Merging #353 (00e5404) into master (4fb247a) will increase coverage by 0.07%.
The diff coverage is 97.59%.

@@            Coverage Diff             @@
##           master     #353      +/-   ##
==========================================
+ Coverage   80.82%   80.90%   +0.07%
==========================================
  Files          15       15
  Lines        3088     3111      +23
==========================================
+ Hits         2496     2517      +21
- Misses        592      594       +2

Impacted Files
Coverage Δ

mplc/utils.py
86.71% <96.36%> (+6.03%)
:arrow_up:

mplc/partner.py
92.59% <100.00%> (-0.82%)
:arrow_down:

mplc/scenario.py
83.21% <100.00%> (+0.71%)
:arrow_up:

mplc/multi_partner_learning/fast_mpl.py
61.09% <0.00%> (-0.82%)
:arrow_down:

mplc/corruption.py
79.67% <0.00%> (-0.74%)
:arrow_down:

mplc/models.py
77.89% <0.00%> (-0.46%)
:arrow_down:

mplc/dataset.py
85.79% <0.00%> (-0.25%)
:arrow_down:

mplc/contributivity.py
76.42% <0.00%> (-0.13%)
:arrow_down:

... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4fb247a...00e5404. Read the comment docs.

Well done @kat-leen great addition to the library for much clearer definition and execution of scenarios 👍


Fix validation on input groups

The invalid-feedback must be placed right after the input element inside the input-group to be visible on errors.
Fixes #98.

Coverage increased (+0.2%) to 87.564% when pulling 4e6d359fb3482105443ba973a82e205936ea3013 on sedrubal:fix_validation-on-input-groups into 16a33caa40110fed31f2d40a3c156dc432201651 on zostera:master.

This seems to be related to: issue #124 which I opened now.

@zostera Can you merge this?


Fix unit test for Together AI

Fix reference to deprecated model id in test_together.py.

This change is


gitoxide update

Tasks

[x] update
[x] use repo.config() instead of git2 config in all places

Codecov Report

Merging #705 (f965965) into main (debd453) will increase coverage by 0.17%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #705      +/-   ##
==========================================
+ Coverage   13.36%   13.53%   +0.17%
==========================================
  Files          19       19
  Lines        1160     1145      -15
==========================================
  Hits          155      155
+ Misses       1005      990      -15

Impacted Files
Coverage Δ

src/info/mod.rs
0.00% <0.00%> (ø)

src/info/repo.rs
16.66% <0.00%> (+1.32%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update debd453...f965965. Read the comment docs.

I think it's ready for review. The changes were tested on MacOS and Windows 11 just to be sure the repo name can indeed be figured out with the refactored code.
Now the last bastion of gitoxide to conquer is worktree changes, and I am looking forward to that. As mentioned before, it might not happen this year, but it's not for a lack of motivation. Let's see :).

Now the last bastion of gitoxide to conquer is worktree changes, and I am looking forward to that. As mentioned before, it might not happen this year, but it's not for a lack of motivation. Let's see :).

Looking forward to it!

I don't want this to block merging, but this PR might be a good opportunity to start adding some tests. What do you think the best testing strategy would be? Generating temporary repos? Mocking gitoxide functions/methods? Or something else?

I'll let you address this part of @spenserblack's comment. I don't mind merging the PR as is but this is typically the kind of work that needs non regression tests. You can just give us some pointers and we will work on it as part of #700

Oh, sorry, I completely and accidentally skipped over @spenserblack 's suggestion about adding some tests. Also I am happy to pick up on @o2sh to make suggestions instead of adding tests.
gitoxide mostly uses real git repositories for testing, and has amassed a set of utilities that are available via git-testtools. The most important one here I imagine would be scripted_fixture_repo_read_only(…) which executes some script while keeping the result locally available and dealing with re-executing it if its contents changes. That way, one could write shell scripts that clone repositories or set them up which can then be fed into Repo::new(fixture) to assert on the result accordingly. The system also comes with an archive feature that in conjunction with git-lfs helps to speed up CI as it won't have to clone repositories all the time anymore (instead, it downloads from git-lfs). That however, is optional and it's possible to disable archive creation entirely using .gitignore files. Now that I write it here I notice that the archival functionality is definitely still under-documented. I will correct that shortly (maybe by the time you read it it's already done).

This is awesome work, and a huge step towards making onefetch more oxidized (I finally realized that the name is a reference to a "Rusty" version of git, right?) 🦀 🎉

Yes, that's right :D. It's also the second attempt at naming the project, which was called grit before, it's git, but with some rust inserted. The motivation to change the name was the programs name, grit, which took too long to type and gix is a little better even though I think most won't ever use it. Ideally, one day people prefer ein over git for typical workflows, but I digress :).


Does not render the application when using MSAL for login.

What is your Test Scenario?

I am replacing react-adal to react-aad-msal. Cannot see the application rendered once I have logged in.
What is the Current behavior?

Does not render my application in tests
What is the Expected behavior?

Renders my application in tests
What is your web application and your TestCafe test code?

I have created a repo with instructions how it can be replicated - https://github.com/zsid/testcafe-azure-ad

I have previously raised a bug for having a loop when logging in with react adal. Might be a good point for reference on how to execute the code within your team - https://github.com/DevExpress/testcafe/issues/4024

I was able to reproduce the issue. I confirm that without TestCafe, the app works and with TestCafe - there is a blank page.
Could you please clarify whether you have problems only if you use the react-adal module?
Do you still have problems with the login loop?

@AlexKamaev, --disable-page-caching has fixed the issue  with react-adal module.
However, we are moving away from react-adal and using msal and react-aad-msal. Please let me know how we can run our tests when using react-aad-msal

The reason we are moving away is adal js is not being support anymore and they are advising people to move to react-aad-msal more info in this issue https://github.com/AzureAD/azure-activedirectory-library-for-js/issues/772.
I dont know if the login loop problem will be present once we move to react-aad-msal. Needs to be tested once the app is rendering

At this moment it's difficult to say why your scenario stopped working. We need to research it in detail.

Good morning @AlexKamaev. Would you be able to suggest a work around to make the tests run until a fix is ready - our e2e tests are blocked at the moment as we cannot authenticate

We don't have a workaround for this behavior yet.

Hey @AlexSkorkin, how is the plan going to address this bug?

Hi @zsid,
we cannot provide any estimates at this time.

hello, I have example of application which successfully logging in user on localhost https://codesandbox.io/s/interesting-roentgen-7vntv
our team shared some credentials and now we can reproduce bug by running npm run testcafe
please try to reproduce it locally and make some resolution

@kerosan, Thank you for the additional information.

Is there any ETA bug fix?

@maximkoev
We don't have ETA for this bug. Once we have news to report, we will notify you here.

there is new versions may fix this bug:
"react-aad-msal": "^2.3.5",
"msal": "^1.3.0",
https://github.com/syncweek-react-aad/react-aad/issues/218

@kerosan
Thank you for additional information. I hope these new versions will help you resolve the issue. However, we still need to research this behavior.

I'm the original logger of #4754 and the latest version of msal (1.3.0) has also resolved this for me. Thanks for your time investigating.

@evansabove, thank you for sharing your findings with us.

Hi All,
I am also facing same issue as mentioned in the thread..
In my organization, We use Azure AD authentication for our Web application.
This is how flow happens :-
a. I pass Azure AD enable url to the Testcafe test of my web application.
b. It goes to the Microsoft site (https://login.microsoftonline.com/) and requires me to Enter - my email ID.
c. The it hits the cloudfed endpoint of my organization and does the SSO authentication
d. It returns the Url along with the Token_ID in the browser
e. Displays a Blank page and  message in console  - "Login_In_Progress: Error during Login call - login is already in progress.  "

This seems to be a show stopper as testcafe is not redirecting to the Web application even after authentication.
Please respond !!

@taruntomar-qa,
Thank you for the report. Unfortunately, we don't have any workaround yet, but we are working on it. We'll update the thread once we have more information to share.

Also seing issues on testing our React SPA app with MSAL.js authentication. I am evaluating TestCafe for providing end-to-end application.  We are using Azure AD B2C as the authentication provider.
We have a automatic redirect to the login page and also endup into infinite loop, so pretty similar to #4754, but we are using msal.js version 1.4.0 and seing this problem. We have our own implementation of getting the MSAL to work with react app instead of using react-aad-msal.
If needed I could provide another example to reproduce the issue with, I think.

I could also provide some more details after a quick study. I am not very deep into the way MSAL.js works, but can maybe provide some insight.
Firstly we are using the implicit grant flow (the only one Azure AD B2C works with currently) and that still locks us down to MSAL.js 1.x instead of the new 2.0.
Getting the authentication to work with MSAL.js without problems was quite a hassle, but some help from Microsoft and looking into the github issues got us past those (when running manually).
So first of all the implicit grant flow seems to rely on page being redirected to the redirect address usually being the same as the SPA app it self and the MSAL.js somehow picks up the details of the authenctication from the URL params. To me it seems that currently that phase is failing as after the redirect I am not seeing the access token as I am supposed to.
So what doest TestCafe do in this case? Also while I do not understand the tricks TestCafe does to make things work, I would also like to note that if Azure B2C is not able to mathc redirect URL being configured (e.g. https://localhost:3000/authRedirect) to the list of approved redirect urls configured to it, then it resorts to redirecting to one of the URL's on its approved list it seems.
And so also what is TestCafe doing to even handle these redirects to keep browser on the TestCafe page (prefixed e.g. with http://<IP_ADDRESS>:33381/igBR4h5Jb*7eKBawbAF!f/)?

It seems that with TestCafe anything relying on window.location regarding those redirects cannot work regarding the Azure AD B2C redirect address as it needs to be configured to address allowed in Azure AD B2C and that call always return the testcafe test address.
Also relying on window.location.pathname seems like it could not work. Trying to achieve trick mentioned in MSAL.js issue 1199, but without use of plain html site (see react-aad-msal dock) and instead the AAD address and detecting the path name. But starting to wonder if that plain HTML site would work any better with TestCafe.

Hello @aviita,
Thank you for reaching out to us.

And so also what is TestCafe doing to even handle these redirects...

TestCafe modifies DOM and prefixes URLs  with a service part. Requests are then proxied by hammerhead.

It seems that with TestCafe anything relying on window.location regarding those redirects cannot work

With TestCafe your application should interact with a browser API the same way as without it, i.e., you can rely on window.location.
Can you check if your application loads under TestCafe with MSAL.js v1.3.0? Please take a look at this comment and check if the solution described there works for you. An example is always welcome.

Ok. I will check the 1.3.0, but I did check 1.3.4 already actually with no difference in behaviour.
In the meantime I noticed that there had been another update to MSAL.js and a followup bug (2370) on that, so yes the MSAL.js is not all that robust in it self. That is why I am so happy it is finally working withuout issues (in regular use). So while the MSAL.js is bit shaky it is the pricing model and other features Azure AD B2C that makes it such a good fit for us that there is currenly no way to back out from that. That is why we might go with another testing tool, we can be sure does not get into trouble with the auth setup.
Anyways I would like to assist in fixing this issue, here is a github gist with the auth code that shares the logic the app works with in regards to this authentication. Note that code in it self does not comile as such, since e.g. the StaticAsset defined by NSwag based on our REST API is missing. Also if you want to reproduce this, can you setup your own Azure B2C tenant or do you need help in that regard? One needs to have the application (in B2C) configured for SPA app with implicit grant flow to make this code work. Additionally as code comments show there needs to be this one scope configured for Read.All.

@aviita, Thank you for your assistance. We will look into the example you shared. I would like to one more time draw your attention to this solution), which may help you resolve the issue.

@arubtsov, I guess I forgot to mention that I did run all my test runs with node --max-http-header-size=1024000, so that did not help to resolve the issue. It may be though that we will select another end-to-end testing tool in the end to ensure the authentication does not come an issue for us. In the meantime I can try to provide more information to solve this issue if need be.

Thank you for the additional information. We started to research the issue, however, we cannot give any estimates on this.

I can try to provide more information to solve this issue if need be

Thank you for the cooperation. We will let you know if we need further assistance.

We researched the issue and are working on a fix.
For the team:
This issue is caused by an incorrect interaction with the msal library, which uses redirects for authentication and partially clears sessionStorage between the beforeunload and unload events.
Storage wrappers (for localStorage and sessionStorage) don't save changes in native storages if these changes take place after the beforeunload event. This means that changes that are applied between the beforeunload event and the moment the page is closed are discarded and won't be available after the redirect.
msal's behavior depends on the content of sessionStorage. When sessionStorage is not updated correctly, msal behaves differently. In this case, the user is not considered authorized, and react-aad-msal does not render the page.


outdated npm version

Expected Behavior
clasp create --rootDir command should recognise rootDir option.
Actual Behavior
Throws error saying:
error: unknown option `--rootDir'

Steps to Reproduce the Problem

npm i @google/clasp -g
clasp create some-project --rootDir './dist'

Specifications

Node version (node -v): v8.7.0
Version (clasp -v): 1.5.3
OS (Mac/Linux/Windows): Linux

This is a known issue. I'm trying to finish merging @mainmode1 PRs/features before publishing.


Remove Runtime.GetCurrentMachineId and Runtime.Receive

Should we remove these two runtime APIs? This will allow us to also remove TaskMap from the production runtime, simplifying things.
GetCurrentMachineId  is used from non-P# machine code to get access to the underlying MachineId (the assumption is that the task calling this API is the same task that executes the machine).
Receive is used to wait upon an event from non-P# machine code (again, the assumption is that the task calling this API is the same task that executes the machine).
I believe that both APIs can be replaced by exposing some sort of callback from the machine. The assumption that the machine task must call these APIs, makes it safe to use (as long as the user respects the assumption of course).
We mainly use them in the PSharpModels repository:

https://github.com/p-org/PSharpModels/search?utf8=✓&q=GetCurrentMachineId
https://github.com/p-org/PSharpModels/search?utf8=✓&q=Runtime.Receive&type=Code

I am not sure if we are still working on this repo, but we might want to update it if we make this change.

Nar uses both these APIs. Let us discuss his code patterns before implementing this change. I would also like to discuss the topic of testing in production mode (see #142 ) before we choose to remove any assertions from the production runtime.
In general, I support making the runtime more lightweight. If we can pull off things like async-await without needing TaskMap then we should try to get rid of it.
The PSharpModels repository is not being actively used and we don't have to worry about keeping it updated.

Done in #148


OSX ASSERT_OBJCEQ output prints object pointer instead of description

Dependent on https://github.com/Microsoft/WinObjC/pull/634
Eg:
[ RUN      ] NSBundle.Localizations
Foundation/ReferenceFoundation/TestNSBundle.mm:89: Failure
Value of: bundle.localizations
Actual: 0x7ff2e1c04ec0
Expected: @[ @"en" ]
Which is: 0x7ff2e1c4b7d0
[  FAILED  ] NSBundle.Localizations (0 ms)
This makes diagnosing issues quite a bit more difficult - we should see why our ostream specialization for id isn't getting hit.

It seems that the issue is related to our << specialization being in the testing::internal:: namespace.


Memory leak in Isolate.spawnUri

FAILED: dartk-vm release_x64 lib_2/isolate/spawn_uri_nested_vm_test/1
Expected: Pass
Actual: Crash

--- Command "vm" (took 02.000422s):
DART_CONFIGURATION=ReleaseASANX64 out/ReleaseASANX64/dart --no-enable-isolate-groups --ignore-unrecognized-flags --packages=/usr/local/google/home/rmacnak/d\
art3/sdk/.packages /usr/local/google/home/rmacnak/dart3/sdk/tests/lib_2/isolate/spawn_uri_nested_vm_test.dart

exit code:
-6

stdout:
unittest-suite-wait-for-done
[1, 2]
unittest-suite-success

stderr:
=================================================================
==58763==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x56313eb7b43d in operator new(unsigned long) ../recipe_cleanup/clangshYTOG/llvm_build_dir/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-l\
inux-gnu-bins/compiler-rt/lib/asan/asan_new_delete.cpp:99:3
    #1 0x56313eb8aa7a in dart::bin::CreateIsolateGroupAndSetupHelper(bool, char const*, char const*, char const*, Dart_IsolateFlags*, void*, char**, int*) .\
./../out/ReleaseASANX64/../../runtime/bin/main.cc:676:25
    #2 0x56313eb8cb1d in dart::bin::CreateIsolateGroupAndSetup(char const*, char const*, char const*, char const*, Dart_IsolateFlags*, void*, char**) ../../\
out/ReleaseASANX64/../../runtime/bin/main.cc:727:10
    #3 0x56313ef481bd in dart::SpawnIsolateTask::Run() ../../out/ReleaseASANX64/../../runtime/lib/isolate.cc:308:44
    #4 0x56313f571697 in dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) ../../out/ReleaseASANX64/../../runtime/vm/thread_pool.cc:111:15
    #5 0x56313f572d0d in dart::ThreadPool::Worker::Main(unsigned long) ../../out/ReleaseASANX64/../../runtime/vm/thread_pool.cc:275:9
    #6 0x56313f39144e in dart::ThreadStart(void*) ../../out/ReleaseASANX64/../../runtime/vm/os_thread_linux.cc:138:5
    #7 0x7f4580171fb6 in start_thread /build/glibc-oCLvUT/glibc-2.29/nptl/pthread_create.c:486:8

Indirect leak of 58 byte(s) in 1 object(s) allocated from:
    #0 0x56313eb3e8a1 in strdup ../recipe_cleanup/clangshYTOG/llvm_build_dir/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/compile\
r-rt/lib/asan/asan_interceptors.cpp:452:3
    #1 0x56313ec141f4 in dart::bin::IsolateData::IsolateData(dart::bin::IsolateGroupData*) ../../out/ReleaseASANX64/../../runtime/bin/isolate_data.cc:43:22
    #2 0x56313eb8aa89 in dart::bin::CreateIsolateGroupAndSetupHelper(bool, char const*, char const*, char const*, Dart_IsolateFlags*, void*, char**, int*) .\
./../out/ReleaseASANX64/../../runtime/bin/main.cc:676:29
    #3 0x56313eb8cb1d in dart::bin::CreateIsolateGroupAndSetup(char const*, char const*, char const*, char const*, Dart_IsolateFlags*, void*, char**) ../../\
out/ReleaseASANX64/../../runtime/bin/main.cc:727:10
    #4 0x56313ef481bd in dart::SpawnIsolateTask::Run() ../../out/ReleaseASANX64/../../runtime/lib/isolate.cc:308:44
    #5 0x56313f571697 in dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*) ../../out/ReleaseASANX64/../../runtime/vm/thread_pool.cc:111:15
    #6 0x56313f572d0d in dart::ThreadPool::Worker::Main(unsigned long) ../../out/ReleaseASANX64/../../runtime/vm/thread_pool.cc:275:9
    #7 0x56313f39144e in dart::ThreadStart(void*) ../../out/ReleaseASANX64/../../runtime/vm/os_thread_linux.cc:138:5
    #8 0x7f4580171fb6 in start_thread /build/glibc-oCLvUT/glibc-2.29/nptl/pthread_create.c:486:8

SUMMARY: AddressSanitizer: 82 byte(s) leaked in 2 allocation(s).

--- Re-run this test:
python tools/test.py -n dartk-asan-linux-release-x64 lib_2/isolate/spawn_uri_nested_vm_test/1

Maybe the isolate cleanup callback not being called if isolate spawn is interrupted?

Has this been fixed? When I run this locally asan doesn't seem to report leaks.

I did a query of the test results database to see if this test existed as an approved failure and it does show up in the query:

builder_name | suite | test_name | expected | unexpected_result | flaky

vm-kernel-asan-linux-release-x64 lib_2 isolate/spawn_uri_nested_vm_test/0 Pass null true
vm-kernel-asan-linux-release-x64 lib_2 isolate/spawn_uri_nested_vm_test/1 Pass Crash true

It is marked as flaky probably explaining why it doesn't reproduce easily when run locally.

After looking for some time, I managed to reproduce it by adding the following change:
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 8993e5f3855..9335b5981d8 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1894,6 +1894,7 @@ Isolate* Isolate::InitIsolate(const char* name_prefix,
   }

   // Add to isolate list. Shutdown and delete the isolate on failure.
+  sleep(1);
   if (!TryMarkIsolateReady(result)) {
     result->LowLevelShutdown();
     Isolate::LowLevelCleanup(result);

Will fix it.


Audio doesn't gets destroyed while switching scene from asteroid-game

Describe the bug
The audio doesn't gets destroyed right now while we switch from asteroid-game to any other scene
To Reproduce
Steps to reproduce the behavior:

Go to asteroid-game.scn
switch to any  other scene

Expected behavior
Audio should be destroyed while scene is switched
Screenshots
https://user-images.githubusercontent.com/35926530/184216092-bf92a5bb-acfe-4384-a993-eb8e8a381f3b.mp4

Hi guys, hope this PR resolve the bug :)
https://github.com/webaverse/asteroids/pull/1

Hi @lout33, thanks for your contribution. I just saw it now and already worked on it.

No problem 👍


fix rendering non-members on the dashboard

updates #236

I've deployed this to my instance now and I can't see the dashboard missbehaving anymore. Thanks!
Also pretty cool to see tests with the pull that test this behaviour ;)


should not follow myself

current user is<EMAIL_ADDRESS>should not follow myself.
need to check all follow elements.

improved in the backend! @zhanggoodzhi Exception handler in the front end is also needed(Loading is lingering).


Added setMaxTransactionFee()

Added setMaxTransactionFee()

As per my comments on your other PRs, please just inline the value and use _ as a thousands-separator.


IDSEQ-1557 - Remove demo user

Description
Remove all references to "demo user" from our code base, since it is not being used anymore.
Tests

Manual tests
No changes required to automated tests

After this goes in, could you also delete the user or change the password in staging/prod?

After this goes in, could you also delete the user or change the password in staging/prod?

Sure, that's my plan. I wanted to do that yesterday but I was waiting to check if anyone had anything against removing this user. Considering this is approved, I'm doing this right away.


add 'A pattern language for microservices'

This article explains pattern for the microservice architecture.

Nice :trophy:   However, later I will move it up since this portion is for company usecases. Thanks bro :+1:


Warning: proc_open(): CreateProcess failed, error code - 2

Hi,
I'm currently trying to use your wkhtmltopdf but I cannot get passed a Warning call saying :
Warning: proc_open() [function.proc-open]: CreateProcess failed, error code - 87 in Path/To/WkHtmlToPdf.php on line 325
I tried with a basic code given in the tutorial but it doesn't work.
$pdf = new WkHtmlToPdf;
$pdf->addPage('http://google.com');
$pdf->send();
The error code 87 stands for invalid parameter.
Anyone can help me ?
Thank you

@mikehaertl I've created a command exec library that address inconsistencies between linux and windows environments. You might wanna consider using it to build your lib commands.
https://github.com/tivie/command
If you wish, I can help you implement this.

@tivie That looks nice. Maybe something to consider for a 3.0 release. On the other hand, from looking at the code I couldn't actually find a big difference in the core part (proc_open()). If you have some hints how to improve my php-shellcommand, I'm happy to include those changes. Your class makes sense for more advanced scenarios (method chaining, etc.). But our use case here is pretty simple. And I still believe in my own php-shellcommand implemenation ;).
BTW you may also hit this problem: https://github.com/mikehaertl/php-shellcommand/issues/6. Maybe worth adding to your class, too?

@mikehaertl thanks.
The only big difference is in the automatic selection of proc_open or exec based on OS (in windows it uses exec, otherwise uses proc_open.)

If you have some hints how to improve my php-shellcommand, I'm happy to include those changes

Maybe add this:

Automatic fallback to exec in windows environments
A way to change the produced command before executing it

Those two would be awesome.

BTW you may also hit this problem: mikehaertl/php-shellcommand#6. Maybe worth adding to your class, too?
Yeah, that's worth adding as an opt-in option when dealing with long outputs. Thanks for the suggestion. =)

use the bypass_shell options of proc_open to make it works on windows


unable to login when NGINX is in front of phoscon to provide HTTPS encryption

as described.
If i access phoscon via HTTP on the DECONZ_WEB_PORT i can login no problem but if i place phoscon behind NGINX Reverse Proxy in order to provide SSL i can no longer login .
i can see that when i press the login button i get error 403 for the "/api" call and this error is returned:
[{"error":{"address":"/","description":"link button not pressed","type":101}}]
docker compose is the following:
version: '3.4'
services:
  deconz:
    image: marthoc/deconz:stable
    container_name: deconz
    restart: always
    network_mode: host
    volumes:
      - /volume1/docker/deconz/deCONZ:/root/.local/share/dresden-elektronik/deCONZ
      - /etc/localtime:/etc/localtime:ro
    devices:
      - /dev/ttyACM0
    environment:
      - DECONZ_WEB_PORT=4080
      - DECONZ_WS_PORT=4443
      - DECONZ_VNC_PORT=5900
      - DECONZ_NOVNC_PORT=6080
      - DECONZ_DEVICE=/dev/ttyACM0
      - DECONZ_VNC_PASSWORD=changemehere
      - DEBUG_INFO=1
      - DEBUG_APS=0
      - DEBUG_ZCL=0
      - DEBUG_ZDP=0
      - DEBUG_OTAU=0

I don't see any direct issue with docker, please use https://github.com/dresden-elektronik/deconz-rest-plugin

done https://github.com/dresden-elektronik/deconz-rest-plugin/issues/4892

Closing as this is likely not related to docker.


docs: add MES on showcase

What is it?
We recently rewrote the https://meetenhancementsuite.com/ landing page to be a SSR Qwik application, and would love to showcase it.

[ ] Feature / enhancement
[ ] Bug
[X] Docs / tests

Description
We worked for the past two weeks to convert on Ruby on Rails Jekyl site into a Qwik site and would love to showcase that to other Qwik community members.

The speed score is not very good though:
https://pagespeed.web.dev/report?url=https%3A%2F%2Fmeetenhancementsuite.com%2F
Seems like the perf drop is caused by:

images not having a specified width/height (which causes layout invalidation)
google analytics and other lib

Are you aware of partytown?

Thats pretty odd since Lighthouse gives this website a 98....🤔

Hi @hkd987 👋
Just wanted to quickly check-in and ask if you had a chance to implement partytown on your app as suggested by Manu? The showcases show always the mobile scores and they are on your page at 73 currently. Desktop is at 97 which is great 😄

Hi @hkd987 👋
Just re-checked the page and it looks like the mobile score didn't change since the last review. Would be great if you could try to improve the scores as mentioned by Manu above 🙏  my suggestion would be to keep this PR open for 2 more weeks and close it then. Feel free to create a new one when ever you're ready 🎉

Hi @hkd987 👋
Thanks again for creating this PR and submitting your page 🙏 since i didn't hear anything from you i'll close this PR for now. Feel free to re-open it at any time when u think the page is ready.


Unable to pass custom data to custom Content Type message view holders

I noticed this functionality was added for incoming/outcoming text/image message view holders. I've submitted a PR to include this functionality for custom content type messages.
https://github.com/stfalcon-studio/ChatKit/pull/185

Waiting for response #185


Fix a small spelling mistake

In the docs, it says "jsDelivr, a free open source CDN" while it should be "A free, open source CDN".

Agreed, closing this since IMHO it looks better as-is.


whether this repo could deployed on vercel

err like this in frontend
st.experimental_memo is deprecated. Please use the new command st.cache_data instead, which has the same behavior. More information in our docs.
st.experimental_memo is deprecated. Please use the new command st.cache_data instead, which has the same behavior. More information in our docs.
st.experimental_memo is deprecated. Please use the new command st.cache_data instead, which has the same behavior. More information in our docs.
st.experimental_memo is deprecated. Please use the new command st.cache_data instead, which has the same behavior. More information in our docs.
st.experimental_memo is deprecated. Please use the new command st.cache_data instead, which has the same behavior. More information in our docs.
TypeError: unsupported operand type(s) for |: 'type' and '_GenericAlias'
Traceback:
File "/Users/apple/opt/anaconda3/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "/Users/apple/codework/codedownload/file-gpt-main/app.py", line 4, in
from utils import (
File "/Users/apple/codework/codedownload/file-gpt-main/utils.py", line 167, in
def wrap_text_in_html(text: str | List[str]) -> str:

if you don't use HTML as an input file, limit files like txt, pdf, doc, csv, then i suggest you can remove the function def wrap_text_in_html(text: str | List[str]) -> str in file ultis.py