[2.x] Major refactoring

Rewritten from scratch
The project got re-written from scratch as stated the reasons in https://github.com/beyondcode/laravel-websockets/pull/519
The contributors are going to remain the same, including @francislavoie with the awesome starting point to horizontally-scale the running servers.
Rewrite changelog

The migration file suffered a small modification. Run vendor:publish to get the second migration file that changes the fields to plural.
The configuration file got itself re-written as well with simplicity in mind (the initial 2.x was still a mess). Get a new copy of it.
Interfaces moved to Beyondcode\LaravelWebSockets\Contracts\*. If you extend certain functionalities, makes sure to use the right namespaced interfaces.
The replication driver is now called replication mode. Env's WEBSOCKETS_REPLICATION_MODE variable now can be set to local or redis.
Replicators got merged into Channel Managers. If you added your own custom replicator, you now should implement the BeyondCode\LaravelWebSockets\Contracts\ChannelManager interface.
Statistics Loggers are now called Statistics Collectors. Their job is to temporarily store the data between dumps into the database (by default).
Handlers for the WebSocket, as well as the HTTP API Server, got re-written. They are still found in the config, but make sure to check them if you extend one of them.
The vast majority functions of the channel managers now use PromiseInterfaces for consistencies. This means that instead of returning int or strings, you may now return a FulfilledPromise($value) to easily get resolved. If you don't implement  your own channel manager (or now defunct, replicator), it's totally fine.
Presence channels now properly trigger the .here() methods.
Dashboard got broadcasting fixes. If you still encounter issues with sending events from the dashboard, open an issue.

Pre-Rewrite changelog

[x] Restructured the config file (https://github.com/beyondcode/laravel-websockets/pull/446)
[x] ~Redis PubSub driver support for Horizontally-scaled WebSocket servers (https://github.com/beyondcode/laravel-websockets/pull/140, https://github.com/beyondcode/laravel-websockets/pull/448, https://github.com/beyondcode/laravel-websockets/pull/477, https://github.com/beyondcode/laravel-websockets/commit/5b6bdf49e46eead770d8cbab0ed7db53849561f3)~ Rewritten, Channel Managers now do all the jobs on tracking the channels and connections
[x] Rename the AppProvider to AppManager to avoid conflicts with Larave's App Providers (https://github.com/beyondcode/laravel-websockets/pull/451)
[x] Remove Laravel 5.8.x (https://github.com/beyondcode/laravel-websockets/pull/452)
[x] ~Extendable hooks as in https://github.com/beyondcode/laravel-websockets/issues/80 (https://github.com/beyondcode/laravel-websockets/pull/465, https://github.com/beyondcode/laravel-websockets/commit/3e239a0728bb37f613e5abe7015843cd089669cb)~ The extendable hooks' place in config file got changed. Get a new copy of the config file.
[x] Refactor dashboard with Tailwind (https://github.com/beyondcode/laravel-websockets/pull/467)
[x] Add per-app CORS settings (https://github.com/beyondcode/laravel-websockets/pull/469)
[x] ~Docblocks (https://github.com/beyondcode/laravel-websockets/pull/471)~ Rewritten from scratch.
[x] ~Custom statistics loggers (including the already-provided Database using ORM) (https://github.com/beyondcode/laravel-websockets/pull/473, https://github.com/beyondcode/laravel-websockets/pull/482/commits/714cc5b22def3da5f1ef8da23b2c89cd0af42d87, https://github.com/beyondcode/laravel-websockets/pull/482/commits/108a717c0af82f5f04e8164a13211b3c36dcc401)~ Statistics Loggers now are called Statistics Collectors and their job is to store the data temporarily between dumps. When the amount of time in seconds pass, they are dumped into a Statistics Store. Defaults to Database.
[x] ~More use cases tests (https://github.com/beyondcode/laravel-websockets/pull/450, https://github.com/beyondcode/laravel-websockets/pull/453, https://github.com/beyondcode/laravel-websockets/pull/464, https://github.com/beyondcode/laravel-websockets/pull/482)~ TDD-ed the entire project while keeping in mind the functionality tests.
[x] Update docs to reflect changes (https://github.com/beyondcode/laravel-websockets/pull/468)

[x] Using WebSockets with Cloudflare (does not support 6001 as default port)

[x] Setting up the websockets broadcaster for the horizontal scaling function

[x] Restarting the server with websockets:restart

So So happy to see these things finally progressing. Will try and update this during the week and will test it out on staging.

@lionslair Lovely!!! Hit the issues board for suggestions/issues.

@lionslair Lovely!!! Hit the issues board for suggestions/issues.

I will have not had a chance to enable yet. 2 / 12hr days. will do my best to get it turned on tomorrow. Thanks for putting the work in on these topics

Codecov Report

Merging #447 into master will increase coverage by 24.51%.
The diff coverage is 79.73%.

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

I am getting a strange JS error this afternoon on the dashboard

seems related to the connection
`
    this.pusher.connection.bind('error', event => {
      if (event.error.data.code === 4100) {
        this.connected = false;
        this.logs = [];
        this.chart = null;

        throw new Error("Over capacity");
      }

      this.connecting = false;

`

@lionslair It seems like the event.error does not exist. Can you post here the value of event? 🤔

@lionslair It seems like the event.error does not exist. Can you post here the value of event? thinking

I am just loading the dashboard. It is when I hit connect to the app

@lionslair It seems like the event.error does not exist. Can you post here the value of event? thinking

Solved. I edited the secret somehow this afternoon. I have spent all day trying to get this running on staging. I don't think the broadcaster websockets is working when using pubsub setup. I can see no messages in the dashboard being sent by laravel

@lionslair The messages are being sent by the laravel's event classes or by using the dashboard form?

@lionslair The messages are being sent by the laravel's event classes or by using the dashboard form?

nope

@lionslair The messages are being sent by the laravel's event classes or by using the dashboard form?

nope

I get that message from friday still.
message: Argument 3 passed to BeyondCode\LaravelWebSockets\PubSub\Broadcasters\RedisPusherBroadcaster::broadcast() must be of the type array, null given, called in /home/PATH/vendor/beyondcode/laravel-websockets/src/Dashboard/Http/Controllers/SendMessage.php on line 41
Exception: TypeError
vendor/beyondcode/laravel-websockets/src/PubSub/Broadcasters/RedisPusherBroadcaster.php
line: 134

Hmm then others I do it but not showing in the activity. So I do not think the pubsub is working correctly.

@lionslair Try updating to latest 2.0.0-beta.10, I have added more functional tests and there are fixed a few issues with the dashboard broadcasting & event listening.

@lionslair Try updating to latest 2.0.0-beta.10, I have added more functional tests and there are fixed a few issues with the dashboard broadcasting & event listening.

Been sticking to
    "beyondcode/laravel-websockets": "2.x-dev",
apart from when I am trying to debug. just pulled

does it need to clear the channel and event name on every submit but leave the data. Can it leave it and have a reset button to clear it?

@lionslair Try updating to latest 2.0.0-beta.10, I have added more functional tests and there are fixed a few issues with the dashboard broadcasting & event listening.

Seems to post from the dashboard ok now but no events appear to be getting received from laravel that are being broadcast

@rennokki  does it make any sense why or how $connection can be empty?

If it's null then it uses the default Redis connection for the Pub/Sub:

However, I think the connection name should be replaced with the one configured in the replication config.

If it's null then it uses the default Redis connection for the Pub/Sub:

However, I think the connection name should be replaced with the one configured in the replication config.

Hmm we are using phpredis but I don't think that matters.

@lionslair It's perfectly fine either way, it depends on the driver you're using with Redis. I just pointed out that the ->connection(null) does not change anything if it's null.
You pointed out that the connection is null and gets through json_encode and it turns out to be empty array.

When an event fires that uses broadcast what is the websocket driver.
I am trying to work out what is the difference with the websocket driver. Is the PushesToPusher meant to be involved because it's only called by dashboard and send message

@lionslair Fixed that in beta.11

@lionslair Fixed that in beta.11

trying to update

@lionslair Fixed that in beta.11

Yes testing. Well trying to update well I wait for deployment process

its working on staging now its receiving

Is this just related to the in progress of this branch?
And the log of saving statistics

@lionslair How many active horizontally-scaled workers do you have?

@lionslair How many active horizontally-scaled workers do you have?

only two most of the time. But its enough to know the pubsub is working.

I'm not sure what this list of api-message logs has to do. It is triggered only when you trigger an event from the dashboard.

I'm not sure what this list of api-message logs has to do. It is triggered only when you trigger an event from the dashboard.

We are triggering no events from the dashboard. Just keeps logging that when the dashboard is open.

I'm not sure what this list of api-message logs has to do. It is triggered only when you trigger an event from the dashboard.

We are triggering no events from the dashboard. Just keeps logging that when the dashboard is open.

Oh your right. I think it's a health-check

@rennokki messages from the dashboard that are sent do not show in the activity. Is SendMessage skipping some of the options such as pusher_path ?
https://github.com/beyondcode/laravel-websockets/issues/455#issuecomment-680649075

@lionslair I have tested it for a week or so on a prod environment using the Redis driver and it seems like it works properly so far. Need some confirmation from your side to know if I'll be willing to merge this PR today.

@lionslair I have to give you credit on the docs examples that contain environment variables for the config settings.

@lionslair Upgrading to -beta.13 removes the websockets driver. Change it to pusher for the same results.

@lionslair Upgrading to -beta.13 removes the websockets driver. Change it to pusher for the same results.

I was actually going to suggest this the other day because I deleted the pusher one in my setup. I guess I can probably just rename then.

@lionslair Upgrading to -beta.13 removes the websockets driver. Change it to pusher for the same results.

[2020-08-28 01:51:45] local.ERROR: Failed to connect to Pusher. {"exception":"[object] (Illuminate\Broadcasting\BroadcastException(code: 0): Failed to connect to Pusher. at /var/www/project/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php:121)
[stacktrace]
#0 /var/www/project/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php(64): Illuminate\Broadcasting\Broadcasters\PusherBroadcaster->broadcast(Array, 'App\\Events\\Broa...', Array)
#1 [internal function]: Illuminate\Broadcasting\BroadcastEvent->handle(Object(Illuminate\Broadcasting\Broadcasters\PusherBroadcaster))
#2 /var/www/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): call_user_func_array(Array, Array)

Make sure the connection details are properly set. The websockets driver that just got deleted perhaps had the right configuration. Just copy the old websockets broadcast driver, paste it to your config and change driver to pusher

Make sure the connection details are properly set. The websockets driver that just got deleted perhaps had the right configuration. Just copy the old websockets broadcast driver, paste it to your config and change driver to pusher

I have done that but I do not see it use the package code at all now in the stack  trace
`
[2020-08-28 05:04:49] local.ERROR: Failed to connect to Pusher. {"exception":"[object] (Illuminate\Broadcasting\BroadcastException(code: 0): Failed to connect to Pusher. at /var/www/project/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php:121)
[stacktrace]
#0 /var/www/project/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php(64): Illuminate\Broadcasting\Broadcasters\PusherBroadcaster->broadcast(Array, 'App\\Events\\Broa...', Array)
#1 [internal function]: Illuminate\Broadcasting\BroadcastEvent->handle(Object(Illuminate\Broadcasting\Broadcasters\PusherBroadcaster))
#2 /var/www/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): call_user_func_array(Array, Array)
#3 /var/www/project/vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#4 /var/www/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#5 /var/www/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(39): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#6 /var/www/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(596): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#7 /var/www/project/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(94): Illuminate\Container\Container->call(Array)
#8 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#9 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#10 /var/www/project/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#11 /var/www/project/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(83): Illuminate\Bus\Dispatcher->dispatchNow(Object(Illuminate\Broadcasting\BroadcastEvent), false)
#12 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#13 /var/www/project/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#14 /var/www/project/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(85): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#15 /var/www/project/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(59): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\RedisJob), Object(Illuminate\Broadcasting\BroadcastEvent))
#16 /var/www/project/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\RedisJob), Array)
#17 /var/www/project/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(356): Illuminate\Queue\Jobs\Job->fire()
#18 /var/www/project/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(306): Illuminate\Queue\Worker->process('redis', Object(Illuminate\Queue\Jobs\RedisJob), Object(Illuminate\Queue\WorkerOptions))
#19 /var/www/project/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(132): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\RedisJob), 'redis', Object(Illuminate\Queue\WorkerOptions))
#20 /var/www/project/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(112): Illuminate\Queue\Worker->daemon('redis', 'cineq-local-inf...', Object(Illuminate\Queue\WorkerOptions))
#21 /var/www/project/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(96): Illuminate\Queue\Console\WorkCommand->runWorker('redis', 'cineq-local-inf...')
#22 /var/www/project/vendor/laravel/horizon/src/Console/WorkCommand.php(46): Illuminate\Queue\Console\WorkCommand->handle()
#23 [internal function]: Laravel\Horizon\Console\WorkCommand->handle()
#24 /var/www/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): call_user_func_array(Array, Array)
#25 /var/www/project/vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#26 /var/www/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#27 /var/www/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(39): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#28 /var/www/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(596): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#29 /var/www/project/vendor/laravel/framework/src/Illuminate/Console/Command.php(134): Illuminate\Container\Container->call(Array)
#30 /var/www/project/vendor/symfony/console/Command/Command.php(258): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#31 /var/www/project/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#32 /var/www/project/vendor/symfony/console/Application.php(911): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#33 /var/www/project/vendor/symfony/console/Application.php(264): Symfony\Component\Console\Application->doRunCommand(Object(Laravel\Horizon\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#34 /var/www/project/vendor/symfony/console/Application.php(140): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#35 /var/www/project/vendor/laravel/framework/src/Illuminate/Console/Application.php(93): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#36 /var/www/project/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#37 /var/www/project/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#38 {main}
"}
`
broadcasting.php
`
'pusher' => [
'driver'  => 'pusher',
'key'     => env('PUSHER_APP_KEY'),
'secret'  => env('PUSHER_APP_SECRET'),
'app_id'  => env('PUSHER_APP_ID'),
'options' => [
//'cluster'      => env('PUSHER_APP_CLUSTER'),
'useTLS'       => env('PUSHER_APP_ENCRYPTED', true),
'host'         => env('PUSHER_APP_HOST', '<IP_ADDRESS>'),
'port'         => env('PUSHER_APP_PORT', 6001),
'path'         => env('PUSHER_APP_PATH'),
'scheme'       => env('PUSHER_APP_SCHEME', 'https'),
'curl_options' => [
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_SSL_VERIFYPEER => 0,
],
],
],
`
`
BROADCAST_DRIVER=pusher
`
env
`
PUSHER_APP_ID="project-websockets-local"
PUSHER_APP_KEY="123456789"
PUSHER_APP_SECRET="987654321"
PUSHER_APP_PORT=443
PUSHER_APP_HOST=project.test
MIX_PUSHER_APP_KEY="123456789"
MIX_PUSHER_PORT=443
MIX_WS_HOST=project.test
For Local ENV
PUSHER_APP_PATH="/socket" # for the dashboard
PUSHER_PATH="/socket" # for sending broadcasts from php
MIX_WS_PATH="/socket"
LARAVEL_WEBSOCKETS_REPLICATION_DRIVER=redis
LARAVEL_WEBSOCKETS_PORT=443
`

I can see you are using TLS while the server doesn't seem to be configured with TLS? 🤔

I can see you are using TLS while the server doesn't seem to be configured with TLS? thinking

before it was encypted but that is depreciated and not in the doc any more https://github.com/pusher/pusher-http-php/blob/master/src/Pusher.php#L56

even with that false its still the same result

I can see you are using TLS while the server doesn't seem to be configured with TLS? thinking

Frontend seems to be connected fine on the dashboard and pages. Just the backend can not broadcast

Hi @rennokki, from your updates, i can see you removed RedisPusherBroadcaster and it's registration in WebsocketsServiceProvider
And i see RedisPusherBroadcaster was using RedisClient to publish messages previously. But now i could not find the place the RedisClient get used. This might cause the pub/sub replications no longer get worked.
Can you take a look? If i missed something about the flow/logics. Please let me know

Hi @rennokki, from your updates, i can see you removed RedisPusherBroadcaster and it's registration in WebsocketsServiceProvider
And i see RedisPusherBroadcaster was using RedisClient to publish messages previously. But now i could not find the place the RedisClient get used. This might cause the pub/sub replications no longer get worked.
Can you take a look? If i missed something about the flow/logics. Please let me know

Should the PubSub RedisClient be used more than just in the StartWebSocketServer command

They should still work.
The broadcasting manager I removed did nothing but published to the Pub/Sub channel using the in-built Redis Manager instead of the Replicator instance. Instead, I have moved the publishing to the triggered events HTTP endpoint, and when the pusher broadcaster calls the ->trigger() method, the endpoint gets called and the publishing still works. See this commit for -beta.13: https://github.com/beyondcode/laravel-websockets/commit/1616321d446beb75f351e34703d87874aa56fe20
I can't seem to have issues with the server after the update, so perhaps you need additional setup. Have you implemented the ShouldBroadcast trait to the event?

@jamessmith9J9 The RedisClient is used on singleton registration, so you should search for the ReplicatorInterface instead.

@jamessmith9J9 I got your point, the ReplicationInterface is not available in the controller. 🤦

@jamessmith9J9 Just re-checked and it works fine. When registering the TriggerEventController, the replicator is available in the current container upon the server launch, otherwise, it wouldn't work.

@jamessmith9J9 Just re-checked and it works fine. When registering the TriggerEventController, the replicator is available in the current container upon the server launch, otherwise, it wouldn't work.

Are all the docs up to date. We are logging in that TriggerEventController and nothing is logging

@lionslair Restarted the server?

Are all the docs up to date. We are logging in that TriggerEventController and nothing is logging
i had that issue too

@jamessmith9J9 Just re-checked and it works fine. When registering the TriggerEventController, the replicator is available in the current container upon the server launch, otherwise, it wouldn't work.

Are all the docs up to date. We are logging in that TriggerEventController and nothing is logging

yeah, nothing in log. This is my log for response of curl to the endpoint:
[2020-08-28 08:05:38] local.DEBUG: on registration of redis replication
[2020-08-28 08:05:38] local.DEBUG: WebSocketsRouter::getRoutes()
[2020-08-28 08:05:38] local.DEBUG: /apps/{appId}/events
[2020-08-28 08:06:03] local.DEBUG: on registration of redis replication
[2020-08-28 08:06:03] local.DEBUG: WebSocketsRouter::getRoutes()
[2020-08-28 08:06:03] local.DEBUG: /apps/{appId}/events
[2020-08-28 08:13:04] local.DEBUG: Illuminate\Broadcasting\Broadcasters\PusherBroadcaster
[2020-08-28 08:13:04] local.DEBUG: Pusher\Pusher
[2020-08-28 08:13:04] local.DEBUG: $path
[2020-08-28 08:13:04] local.DEBUG: /apps/q-websockets-local/events
[2020-08-28 08:13:04] local.DEBUG: $response
[2020-08-28 08:13:04] local.DEBUG: array (
  'body' => false,
  'status' => 0,
)
[2020-08-28 08:13:04] local.ERROR: Failed to connect to Pusher. {"exception":"[object] (Illuminate\\Broadcasting\\BroadcastException(code: 0): Failed to connect to Pusher. at /var/www/q/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php:126)
[stacktrace]

@lionslair Restarted the server?

every time I change anything. Since I changed the driver like you told me to and pulled 2.x-dev nothing but
[2020-08-28 08:13:04] local.ERROR: Failed to connect to Pusher. {"exception":"[object] (Illuminate\Broadcasting\BroadcastException(code: 0): Failed to connect to Pusher. at src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php:126)
[stacktrace]
Have been crawlling through the code all day.
Can you outline what the flow is now so we can understand.

@lionslair The removed broadcaster driver did nothing but published to the PubSub the payload, instead of letting the WebSocket server do that since it's the one that initializes the replicator.
So the broadcasters have this broadcast() method that triggers an event with a payload on a channel or a set of channels. This is the only thing the removed broadcaster did, and I have moved the ->publish() method into the /app/{appId}/events method logic, as the Pusher Protocol explains: https://pusher.com/docs/channels/library_auth_reference/pusher-websockets-protocol#events
Changing to the default pusher driver, the broadcaster calls the Pusher\Pusher's ->trigger() method that calls the /app/{appId}/events method, making it the same thing, but now it publishes it at the WebSocket server level, not at the broadcaster level, where it has access to the ->replicator member.

The fact that there is a Failed to connect to Pusher. error, indicates to me it's more of a configuration error that it cannot connect to the server. The old broadcaster used the same Pusher\Pusher connection with the proper settings, so perhaps there are some settings you have changed that makes the connection go wild.

The only thing you had to change was to replace 'driver' => 'websockets' with 'driver' => 'pusher' and let all the things exactly the same.

The only thing you had to change was to replace 'driver' => 'websockets' with 'driver' => 'pusher' and let all the things exactly the same.

I can see that your env PUSHER_* got replaced with PUSHER_APP_* variables. Perhaps the missing _APP_ suffix is causing it.

I can see that your env PUSHER_* got replaced with PUSHER_APP_* variables. Perhaps the missing _APP_ suffix is causing it.

I updated to match what is  default in laravel and your docs

SSH into the instances and run php artisan tinker then run config('broadcasting') and check if the driver variables are set properly.

@lionslair Any updates on that? Infra issues? Because I have already been working on an app this weekend that kinda summarises out-of-the-box integration with Redis Pub/Sub and it doesn't seem like it behaves abnormally. 🤔

@lionslair Any updates on that? Infra issues? Because I have already been working on an app this weekend that kinda summarises out-of-the-box integration with Redis Pub/Sub and it doesn't seem like it behaves abnormally. thinking

I have had to do some actual work.  Been watching your commits but have not got it working on the 2.x branch. I have some links to look into Caddy and work out if its our laradock caddy file. But as you said  the path does not seem to be a support option.
It all works from the Dashboard.  Well seeing what happens but I think there is an issue with what you post from the dashboard nt showing in activity. but I think it goes to redis.
So currently unresolved from my end. Can you share what your setup is.  Have you got a host for websockets and one for normal traffic?
what does the Caddyfile look like for this with a self_signed cert for local?

I haven't set up any additional NGINX configuration to make this work. Just opening the 2096 port (as I am working with Cloudflare and it does not support routing of 6001)
On the Redis side, I just have the default Redis settings. Redis 5.x, both predis and phpredis work.
Check if getConnectionUri method in src/PubSub/Drivers/RedisClient.php do generate the right connection URI.

I haven't set up any additional NGINX configuration to make this work. Just opening the 2096 port (as I am working with Cloudflare and it does not support routing of 6001)
On the Redis side, I just have the default Redis settings. Redis 5.x, both predis and phpredis work.
Check if getConnectionUri method in src/PubSub/Drivers/RedisClient.php do generate the right connection URI.

Does not even seem to get in there
`
[2020-09-02 10:06:51] local.ERROR: Failed to connect to Pusher. {"exception":"[object] (Illuminate\Broadcasting\BroadcastException(code: 0): Failed to connect to Pusher. at /vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php:121)
[stacktrace]
#0 /vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastEvent.php(64): Illuminate\Broadcasting\Broadcasters\PusherBroadcaster->broadcast(Array, 'App\\Events\\Broa...', Array)
#1 [internal function]: Illuminate\Broadcasting\BroadcastEvent->handle(Object(Illuminate\Broadcasting\Broadcasters\PusherBroadcaster))
#2 /vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): call_user_func_array(Array, Array)
#3 /vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#4 /vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#5 /vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(39): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#6 /vendor/laravel/framework/src/Illuminate/Container/Container.php(596): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#7 /vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(94): Illuminate\Container\Container->call(Array)
#8 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#9 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#10 /vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#11 /vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(83): Illuminate\Bus\Dispatcher->dispatchNow(Object(Illuminate\Broadcasting\BroadcastEvent), false)
#12 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#13 /vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Broadcasting\BroadcastEvent))
#14 /vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(85): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#15 /vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(59): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\RedisJob), Object(Illuminate\Broadcasting\BroadcastEvent))
#16 /vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\RedisJob), Array)
#17 /vendor/laravel/framework/src/Illuminate/Queue/Worker.php(356): Illuminate\Queue\Jobs\Job->fire()
#18 /vendor/laravel/framework/src/Illuminate/Queue/Worker.php(306): Illuminate\Queue\Worker->process('redis', Object(Illuminate\Queue\Jobs\RedisJob), Object(Illuminate\Queue\WorkerOptions))
#19 /vendor/laravel/framework/src/Illuminate/Queue/Worker.php(132): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\RedisJob), 'redis', Object(Illuminate\Queue\WorkerOptions))
#20 /vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(112): Illuminate\Queue\Worker->daemon('redis', 'cineq-local-inf...', Object(Illuminate\Queue\WorkerOptions))
#21 /vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(96): Illuminate\Queue\Console\WorkCommand->runWorker('redis', 'cineq-local-inf...')
#22 /vendor/laravel/horizon/src/Console/WorkCommand.php(46): Illuminate\Queue\Console\WorkCommand->handle()
#23 [internal function]: Laravel\Horizon\Console\WorkCommand->handle()
#24 /vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): call_user_func_array(Array, Array)
#25 /vendor/laravel/framework/src/Illuminate/Container/Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#26 /vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#27 /vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(39): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#28 /vendor/laravel/framework/src/Illuminate/Container/Container.php(596): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#29 /vendor/laravel/framework/src/Illuminate/Console/Command.php(134): Illuminate\Container\Container->call(Array)
#30 /vendor/symfony/console/Command/Command.php(258): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#31 /vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#32 /vendor/symfony/console/Application.php(916): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#33 /vendor/symfony/console/Application.php(264): Symfony\Component\Console\Application->doRunCommand(Object(Laravel\Horizon\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#34 /vendor/symfony/console/Application.php(140): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#35 /vendor/laravel/framework/src/Illuminate/Console/Application.php(93): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#36 /vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#37 /artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#38 {main}
"}
`

This has to do with the credentials set to connect to the pusher application in broadcasting.php if the server is running.
I assume there are some issues caused by the lack of config:cache on the live server? Locally, config:cache should not be ran, rather you should make sure the config is not cached by calling config:clear

This has to do with the credentials set to connect to the pusher application in broadcasting.php if the server is running.
I assume there are some issues caused by the lack of config:cache on the live server? Locally, config:cache should not be ran, rather you should make sure the config is not cached by calling config:clear

Hmm I see you have removed the curl options again https://github.com/beyondcode/laravel-websockets/blob/2.x/docs/basic-usage/pusher.md

Was the lack of proper curl_options values the issue here? ._.

Was the lack of proper curl_options values the issue here? ._.

no still trying to work it out. why is there path in websockets.php
https://github.com/beyondcode/laravel-websockets/blob/2.x/docs/basic-usage/pusher.md
what value should that have?

The path is for the app, not for the Pusher connection. It is by default null. It's the route prefix applied to the Pusher signing protocol (usually if you have a /websocket path in nginx that upgrades the connection to WS, the path should be set to websocket.

The path is for the app, not for the Pusher connection. It is by default null. It's the route prefix applied to the Pusher signing protocol (usually if you have a /websocket path in nginx that upgrades the connection to WS, the path should be set to websocket)

Ok we are making progress. Its docker. and network access to our local host

I think we have things sorted. Going to lock to your current commit and put it on staging again

@lionslair Hope this won't go too far, but i have reverted some changes. Lock on the beta.16 version instead.

@lionslair Hope this won't go too far, but i have reverted some changes. Lock on the beta.16 version instead.

so  use your latest commit?

I'm not sure if it's the last commit, but I have reverted some changes like a few minutes ago.

I'm not sure if it's the last commit, but I have reverted some changes like a few minutes ago.

https://github.com/beyondcode/laravel-websockets/pull/447/commits/0596d1ad489f1fd9b3decaddda48678efc7d613f

https://github.com/beyondcode/laravel-websockets/commit/0596d1ad489f1fd9b3decaddda48678efc7d613f is alright.

0596d1a is alright.

yeah seems to still work

@rennokki  is the only place this.app.host used on the dashboard here.
https://github.com/beyondcode/laravel-websockets/blob/2.x/resources/views/dashboard.blade.php#L280
If I set the websockets.apps.[0].host
parameter the only place that parameter is used is the dashboard page correct?

Yes, dashboard uses it. But you can see it uses the same ENV variable in broadcasting.php too.

Yes, dashboard uses it. But you can see that the websocket config's host uses the same ENV variable in broadcasting.php.

Yes. That is what my problem is now. Its all working on staging but we have a different hostname (subdomain) for the websockets when deployed compared to locally. (well caddy reverse proxy handles it)
https://github.com/beyondcode/laravel-websockets/blob/2.x/resources/views/dashboard.blade.php#L280
That line takes the over-ride host from the first configured app here https://github.com/beyondcode/laravel-websockets/blob/2.x/resources/views/dashboard.blade.php#L260
Host is not actually documented in the config https://github.com/beyondcode/laravel-websockets/blob/2.x/config/websockets.php#L84
Maybe it should be and default to null. Assuming its meant to be over ridden per app possibly?
else should it be defined in the dashboard config?
`
'dashboard' => [

    'port' => env('LARAVEL_WEBSOCKETS_PORT', 6001),

    'path' => 'laravel-websockets',

`

Why not having two different env variables for them?

Why not having two different env variables for them?

Yeah that is what I am trying to get at. If you need different and it is every going to take the one from the first app how about adding a host option under dashboard so its clear. Then pass it through to the page like is done with port

The defaults are available when you have a single-node app that won't use any reverse proxy as well. Customization says its word. 🤷

ok I added a new env var and set host in the first app again and can now access the dashboard.

How far off do you think this is from being released?

@lionslair Just fixing the following bug and having to re-test on some projects: https://github.com/beyondcode/laravel-websockets/pull/497

@lionslair Just fixing the following bug and having to re-test on some projects: #497

Interesting. Will merge and change that when its merged back to 2.x and test it out.

@lionslair

what does the Caddyfile look like for this with a self_signed cert for local?

I'm late here, but as one of the maintainers of Caddy and also the original author of the horizontal scalability PR, I'm pretty certain I can answer this :sweat_smile:
With Caddy v2, you just need to use the tls internal directive for your site, and Caddy will manage a local CA and automatically renew certificates signed by that local CA. You can also grab the root CA cert and add it to your browser/system's trust so it doesn't complain about TLS trust issues.
With Caddy v2, proxying websockets is incredibly easy:
example.com {
    @ws {
        header Connection *Upgrade*
        header Upgrade    websocket
    }
    reverse_proxy @ws <IP_ADDRESS>:6001 <IP_ADDRESS>:6002

	root * /srv/public
	encode gzip
	php_fastcgi <IP_ADDRESS>:9000
	file_server
}

This config will proxy any requests that are websocket upgrades to your laravel-websockets backend, load balancing between two instances, i.e. <IP_ADDRESS>:6001 and <IP_ADDRESS>:6002 (by default, random selection, but you can configure the load balancing policy, check the docs).
The second half will serve your laravel app using php-fpm (assumes php-fpm is listening on port 9000, but you may use a unix socket instead, check the docs), and serve static files if the file exists on disk and isn't a php script.
If you need more help with running your stuff with Caddy, come ask on the community forums https://caddy.community

@lionslair

what does the Caddyfile look like for this with a self_signed cert for local?

I'm late here, but as one of the maintainers of Caddy and also the original author of the horizontal scalability PR, I'm pretty certain I can answer this sweat_smile
With Caddy v2, you just need to use the tls internal directive for your site, and Caddy will manage a local CA and automatically renew certificates signed by that local CA. You can also grab the root CA cert and add it to your browser/system's trust so it doesn't complain about TLS trust issues.
With Caddy v2, proxying websockets is incredibly easy:
example.com {
    @ws {
        header Connection *Upgrade*
        header Upgrade    websocket
    }
    reverse_proxy @ws <IP_ADDRESS>:6001 <IP_ADDRESS>:6002

	root * /srv/public
	encode gzip
	php_fastcgi <IP_ADDRESS>:9000
	file_server
}

This config will proxy any requests that are websocket upgrades to your laravel-websockets backend, load balancing between two instances, i.e. <IP_ADDRESS>:6001 and <IP_ADDRESS>:6002 (by default, random selection, but you can configure the load balancing policy, check the docs).
The second half will serve your laravel app using php-fpm (assumes php-fpm is listening on port 9000, but you may use a unix socket instead, check the docs), and serve static files if the file exists on disk and isn't a php script.
If you need more help with running your stuff with Caddy, come ask on the community forums https://caddy.community

https://bitbucket.org/lionslair/laradock/src/d857e2aecb96baaad5cc45b66eb39956302fcd96/caddy/caddy/Caddyfile#lines-59

That's for Caddy v1, which is no longer maintained. You should upgrade to Caddy v2.

That's for Caddy v1, which is no longer maintained. You should upgrade to Caddy v2.

I have been wondering why laradock has not updated. They seem to use a custom image with other stuff built in. https://github.com/abiosoft/caddy-docker/blob/master/Dockerfile

That was the de-facto official Docker image for Caddy v1. But for Caddy v2, we have an actual Docker official image: https://hub.docker.com/_/caddy/

I am trying to test this locally and also in a staging environment but keep getting this error when running locally: [2020-09-15 10:24:04] local.ERROR: Driver [websockets] is not supported. {"userId":3,"exception":"[object] (InvalidArgumentException(code: 0): Driver [websockets] is not supported. at /home/vagrant/Sites/qevin/vendor/laravel/framework/src/Illuminate/Broadcasting/BroadcastManager.php:186)
If I set my BROADCAST_DRIVER back to 'pusher' it works fine but in order to use horizontal scaling I need to use the websockets driver.
Any idea of what could be the issue here? I am following the diff from the docs here closely: https://github.com/beyondcode/laravel-websockets/pull/468/files#diff-511162839e3e13ff68698b576fcfc4f7R44-R59

Get the -beta.20 version and a new fresh copy of the config file as well as the second migration file by publishing the migrations with vendor:publish and use the pusher driver as the websockets driver is no longer used.

Thank you for the help @rennokki
I am now trying to set this up on 2 servers under a load balancer. I have both set up and establishing socket connections works on both (I checked the output on both servers via the --debug flag). However, when I broadcast any event it only gets sent to one of the servers i.e. it is sent to the same server that broadcasted the message.
We use a centralized redis instance (elasticache) and pusher as the broadcast driver. The replication mode is set to redis on the default connection.
Do you have any idea of what might be the issue?

We can move the discussion to https://github.com/beyondcode/laravel-websockets/issues/517#event-3772877776

Hi @rennokki
Are there any major bugs in the current 2.0.0-beta.22? Can we use it on a production server?

@vikas5914 It's not ready for production, but if you got a staging/testing environment, you can play with it a bit. :D

I have noticed after the last few changes no graphs appear in the dashboard now.

everything is working fine

@lionslair Make sure to not have the adblocker turned on.

@lionslair Can be related to https://github.com/beyondcode/laravel-websockets/issues/572?

Codecov Report

Merging #447 into master will increase coverage by 41.29%.
The diff coverage is 93.13%.

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

I am getting this error again https://github.com/beyondcode/laravel-websockets/issues/34 when trying to run this "local" for dusk testing

Any ETA on this? Cheers

@rmundel Just calling for some more testing if needed, 2.x should be available soon (~1-2 weeks) if things go fine and no more bugs are being reported.

Sounds like it's possibly time to tag some release candidates?

@rennokki FYI https://github.com/clue/reactphp-buzz is now deprecated, see the README. Very easy to move over to react/http instead.

@francislavoie It got signaled here: https://github.com/beyondcode/laravel-websockets/issues/565
I'll fix the deprecation and perhaps release a new release candidate for some final testings.

1.x: https://github.com/beyondcode/laravel-websockets/pull/583
2.x: https://github.com/beyondcode/laravel-websockets/pull/582
Latest 2.x beta tag: https://github.com/beyondcode/laravel-websockets/releases/tag/2.0.0-beta.26

@rennokki This release is absolutely awesome.
I'm running beta 25 in production (because i need horizontal scaling) and it seems pretty rock solid to me. It is worth noting in the horizontal scaling docs, that all the servers must use a single, common Redis server for pub/sub to work. It may seem trivial, but it could also be the source of a lot of banging your head against the screen.

Yep, that, or a redis cluster: https://redis.io/topics/cluster-tutorial

Yep, that, or a redis cluster: https://redis.io/topics/cluster-tutorial

Have you tested it with a cluster? I'm contemplating going that way with our setup after an outage today due to our single redis server going haywire, and would love any experience on the matter :-) I'll open a new issue if you'd like me to do anything.

@markvesterskov Thank @francislavoie for the initial idea of implementing the Async Redis client and managing users across multiple instances.
It wasn't tested with a Cluster but prolly is a good idea to do it now in the CI pipeline. I wouldn't say it wouldn't work, because we mainly use the Pub/Sub and the key-value storage for references.

@rennokki this is awesome and working great so far in my testing. The only issue I am having now is I just followed the docs to add in event listeners for NewConnection (worked great), then added in WebSocketMessageReceived and EventsConnectionPonged and now I get the following error in the websockets:serve console. Btw: 4AFOf is my AppID.
Error:
Exception Exception thrown: Serialization of 'Closure' is not allowed 4AFOf: exception Exception thrown: Serialization of 'Closure' is not allowed.
Note: I set it up the same for all three of these listeners, swamping out which events I am using of course. Example below:
namespace App\Listeners;

use BeyondCode\LaravelWebSockets\Events\WebSocketMessageReceived;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Support\Facades\Log;

class HandleWebSocketMessageReceived implements ShouldQueue
{
    /**
     * The name of the connection the job should be sent to.
     *
     * @var string|null
     */
    // public $connection = 'async-redis';

    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  object  $event
     * @return void
     */
    public function handle(WebSocketMessageReceived $event)
    {
        //
        Log::info('WEBHOOK LISTENER!', [$event]);
    }
}

Thanks

I couldn't find this section of the Pusher Replacement configuration in the config/websockets.php file.

Does this needs to be added manually?

I couldn't find this section of the Pusher Replacement configuration in the config/websockets.php file.

Does this needs to be added manually?

@zakriyarahman You already have the pusher driver, you just need the additional parameters to make it work.

So last night I was trying to figure out some fixes for the stale data on https://github.com/beyondcode/laravel-websockets/pull/633, and found out that collecting statistics and presence channel user data in a distributed database and not locally is a bad idea.
First off, for horizontal scaling, if one node terminates abruptly, then the connections are lost and the presence channel users connected to that node will be stale - meaning that Redis will still keep track of them. The only failsafe here is with SIGTERM/SIGINT listener that makes sure that when a signal like this is encountered, it basically just closes all the current connections, getting rid of the future stale data.
However, not all interruptions are failsafe - when sudden hardware crashes occur, they seem to stale some old data because Redis doesn't know if any instance is lost. If there are multiple WebSocket instances that can serve the connections that were once on the failed server(s), the data is not considered stale since the user is still connected, following a failsafe exit in another instance.
The worst-case scenario is when there is no other instance that can serve the request, and the user leaves. This means Redis kept tracking a presence channel user and it did not get any signal it left because 1. the failsafe termination using SIGKILL/SIGTERM didn't occur and 2. it left before a new connection established on a working WebSockets instance.
To fix this, if all of the data is still stored on each server, it means that if one node gets down, it loses the data alongside it. This means no Redis or third-party database with poor communication is needed to collect temporary statistics or presence channel users.
The only issue, and here is where I need the help, is some Elasticsearch-like communication protocol that can be used for all the existing servers connected via Redis (because they still communicate via pub/sub) to retrieve data present on multiple machines.
For example, knowing that whenever each WebSockets server is ready to serve, it joins a Redis topic. Whenever we need to retrieve all presence channel users, we call any server, the server calls other servers to retrieve the additional data that are distributed (presence channel users can span across multiple instances), put it all together, and returning the proper response.
This is not however in the plan for 2.x, it's just as a matter of fact that there are some little flaws that are still into consideration in worst-case scenarios.

One idea that comes to mind is to store a dataset for each active server on redis which contains the list of connection IDs currently handled, and a timestamp for last activity from that server.
On a new connection, it adds to the set, on close it removes it. And also every minute or so on a cycle, the timestamp is touched regardless just in case the server isn't receiving connections at a rapid rate.
The key here is that every other server should check this data every few minutes, say 5 minutes +/- some random factor maybe to avoid them all doing it at the same time, to look for stale servers. If the timestamp is older than like 5 minutes, then it grabs the list of connection IDs and deletes all those from the other parts of the storage as stale.
Just an idea that comes to mind. Maybe that'll help you find a similar scheme to deal with it 😅

This feature is the pong tracker that was implemented just like Pusher docs explains it (120s time to ping the connection): https://github.com/beyondcode/laravel-websockets/commit/55f13324932034532f9ff451d410aaa9c5c56eec
, actual logic here: https://github.com/beyondcode/laravel-websockets/blob/2.x/src/ChannelManagers/RedisChannelManager.php#L427-L441
The problem inflicted here is "what happens if the local connection suddenly drops"? If some VPS provider employee trips over a cable and the whole instance goes down without being able to SIGTERM/SIGINT the websockets process? The connections cannot be serialized to be safely stored, so-to-speak to have a stateful way of doing things. Once the connection falls down, it cannot be retrieved.
However, we do keep presence channels' users and we can know when the user last connected, but that requires more logic to cleanup any socket ids stored and their members data for sockets that are not found on any server.

That code is for handling dead websocket client connections. My suggestion was about dead websocket servers. All servers should keep an eye on whether each server has checked in with redis within a certain time period. If not, they should clear out any data that server was managing.

@rennokki Am I missing something?

@rennokki Am I missing something?

The artisan command websockets:flush was removed and we'll find a workaround in the next versions. Try upgrading to the latest beta version.

Any more testing needed to release the kraken?

Guess we're good to go. 👀

Guess we're good to go. 👀

Would it be worth it to wait for #644 sense it has many more breaking changes to app managers and i would love to see you support MySql managers out of the box.
cc @mpociot

Would it be worth it to wait for #644 sense it has many more breaking changes to app managers and i would love to see you support MySql managers out of the box.
cc @mpociot

@morloderex This PR has become too large to handle at this point, so maybe it's a good idea to schedule it for a possible 3.x, since 2.x brings great improvements that might be worth pushing.

@morloderex This PR has become too large to handle at this point, so maybe it's a good idea to schedule it for a possible 3.x, since 2.x brings great improvements that might be worth pushing.

I have talked with @mpociot and decided to take Laravel's way of doing things:

we'll have 1.x support for the current master branch, so any apps that still use 1.x package will still be patched in case of security issues
1.x will become the main branch for now, until a 2.x is released; upon release, 2.x branch is going to be the main branch
from now on, master will take only breaking changes commits for the upcoming versions (see https://laravel.com/docs/8.x/contributions#which-branch for more info)

I have talked with @mpociot and decided to take Laravel's way of doing things:

we'll have 1.x support for the current master branch, so any apps that still use 1.x package will still be patched in case of security issues
1.x will become the main branch for now, until a 2.x is released; upon release, 2.x branch is going to be the main branch
from now on, master will take only breaking changes commits for the upcoming versions (see https://laravel.com/docs/8.x/contributions#which-branch for more info)

@rennokki i see you merged all tfrom 2.x branch into master branch nad delted 2.x branch. So how i install laravel-websockets 2 then ? :)

@rennokki i see you merged all tfrom 2.x branch into master branch nad delted 2.x branch. So how i install laravel-websockets 2 then ? :)

@radudiaconu0 2.x is still under dev but i merged it into master to be able to handle the future prs better. This PR became too large to handle even for github (that threw unicorns when i tried to make a 2.x pr)
2.x is still available under latest beta.

@radudiaconu0 2.x is still under dev but i merged it into master to be able to handle the future prs better. This PR became too large to handle even for github (that threw unicorns when i tried to make a 2.x pr)
2.x is still available under latest beta.

@rennokki so when i run composer require beyondcode/laravel-websockets ths should install 1.x branch or master? :))

@rennokki so when i run composer require beyondcode/laravel-websockets ths should install 1.x branch or master? :))

It will install latest 1.x release. The 1.x release is still on the 1.x branch

It will install latest 1.x release. The 1.x release is still on the 1.x branch


Implicit conversion from data type char to varbinary(max) is not allowed

What steps will reproduce the problem?
i use yii2-admin with sql server, when i create role, assign role and etc, I always get an error.
i look this problem just in rbac, cz in other CRUD still work.

What is the expected result?
how to solve this rbac problem?
What do you get instead?
SQLSTATE[42000]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Implicit conversion from data type char to varbinary(max) is not allowed. Use the CONVERT function to run this query.
The SQL being executed was: INSERT INTO [auth_item] ([name], [type], [description], [rule_name], [data], [created_at], [updated_at]) VALUES ('test', 1, NULL, NULL, NULL,<PHONE_NUMBER>,<PHONE_NUMBER>)
Error Info: Array
(
[0] => 42000
[1] => 257
[2] => [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Implicit conversion from data type char to varbinary(max) is not allowed.
Additional info

Q
A

Yii version
2.0.12

PHP version
7.1

Operating system
SQL Server

Duplicate of https://github.com/yiisoft/yii2/issues/13436

@samdark  this problem fixing in version 2.0.13? and this solution is, just waiting for the next version?

Why waiting? http://www.yiiframework.com/news/149/yii-2-0-13-is-released/

thank you very much 💃 I am trying to upgrade now 👍


What is the format of the annos files?

What are the joints corresponding to labels and the order of their x,y in the file?
Moreover, do the code can cope with partial labels? I.e not all joints are known or visible in every training image?
Thank you

I have updated the README file and draw_point.py to answer your question. Please see the update or run draw_point.py for more details. Thanks a lot!

Thank you,
So the code can't cope with partial labels?
And one more question:
Why do you read the least labels separately?
(begin in records and later begins_list)

The code can't cope with inconsistent labels (e.g. one image is labeled with 14 joints while others are labeled with 15 joints) but can cope with partial labels if all trained images are labeled by the same method (e.g. all images are labeled with x points in the same order, x can be bigger or smaller than 15). Btw, if you want to delete some labeled points based on my annos files, you can refer to delete_points_by_position.py.
As for the other question, I am not sure what's "the least labels". If what you mean is the '1' at the end of each line of annos file, then to my knowledge, the '1's are useless. They are stacked and returned (out_begins = np.stack(begins_list)) as begins but not further used (e.g. see from L118 in train.py). Sorry to have confused you for this useless '1'.

thank you

You are welcome. Closing this. Please feel free to reopen it if you meet any further problem.


Optimize group chat speaker selection system message

Why are these changes needed?
The group chat system message currently always includes the agent descriptions of all agents even when setting speaker_transitions_type = "allowed" meaning only certain agents may follow one another. This means that the system message is longer than it needs to be, increasing cost and reducing performance slightly as well as allowing for the LLM to possibly select a role that it not an allowed transition.
Related issue number
#2456
Checks

[ ] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
[ ] I've added tests (if relevant) corresponding to the changes introduced in this PR.
[x] I've made sure all auto checks have passed.

Hi @Nathan-Intergral, thanks for putting this together.
Before the code gets to the select_speaker_msg function, it should have run self._prepare_and_select_agents within select_speaker:
selected_agent, agents, messages = self._prepare_and_select_agents(last_speaker)
Are you able to tell us if the agents object after it runs that is just the list of allowed agents? If not, that may be a better place to handle it as that has a flow on effect with the actual select speaker functionality (which I'm also working on at the moment. So, if that agents object doesn't have the correct possible agents then the system may still select a different one.
Can you let us know if that's working?
If it is working, then the select_speaker_msg should only be using that object to put in the agents and descriptions.

Hi @Nathan-Intergral, thanks for putting this together.
Before the code gets to the select_speaker_msg function, it should have run self._prepare_and_select_agents within select_speaker: selected_agent, agents, messages = self._prepare_and_select_agents(last_speaker)
Are you able to tell us if the agents object after it runs that is just the list of allowed agents? If not, that may be a better place to handle it as that has a flow on effect with the actual select speaker functionality (which I'm also working on at the moment). So, if that agents object doesn't have the correct possible agents then the system may select an invalid one.
Can you let us know if that's working?
If it is working, then the select_speaker_msg should only be using that object to put in the agents and descriptions.

@marklysze Hey, i have just checked and you are correct, i was running on a slightly older version originally which did not have these changes it turns out.. Thank you for your time but i believe that means that this item can be closed now.

Hi @Nathan-Intergral, thanks for putting this together.
Before the code gets to the select_speaker_msg function, it should have run self._prepare_and_select_agents within select_speaker: selected_agent, agents, messages = self._prepare_and_select_agents(last_speaker)
Are you able to tell us if the agents object after it runs that is just the list of allowed agents? If not, that may be a better place to handle it as that has a flow on effect with the actual select speaker functionality (which I'm also working on at the moment). So, if that agents object doesn't have the correct possible agents then the system may select an invalid one.
Can you let us know if that's working?
If it is working, then the select_speaker_msg should only be using that object to put in the agents and descriptions.

@marklysze Hey, i have just checked and you are correct, i was running on a slightly older version originally which did not have these changes it turns out.. Thank you for your time but i believe that means that this item can be closed now.

Nice! Thanks @Nathan-Intergral


Remove world:target debug error

Brief Description
This PR removes the debug error about world:target needing an index parameter.
The parameter was made optional in #131.
Impact
This will fix compatibility with working code in non debug mode.

World.remove is most definitely a bug or a classic "I am going to work on this later but forgot to stash". I think we should probably remove the wrapper for both World.remove and World.target


Converted the Entire codebase into typescript

I made some fields that were not optional for the connect, consumer, and producer functions optional
Changed "module.export" to "export default"
Configured the tsconfig.json file
Configured the package.json file
Updated some parts of the readme

So I have updated it you can review now


Move smoke tests to integration-test directory

Moves the :application module's smoke tests to integration-test directory.

Codecov Report

Merging #148 into master will decrease coverage by 15.65%.
The diff coverage is n/a.

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 2701b99...54aba0c. Read the comment docs.

This PR has been deprecated after the IRL discussion we just had in favour of the PR I will open in a few minutes.


E_IAP_NOT_AVAILABLE

Please use the Discussion board if you want to get some help. Please use issues to report bugs.

Description
Hello, I'm trying to run initConnection() and I get this error: E_IAP_NOT_AVAILABLE
versions
"react-native": "0.71.8",
"react-native-iap": "^12.10.5",
Environment:

react-native-iap:
react-native:
Platforms (iOS, Android, emulator, simulator, device):

I tried to run this im my code:
const checkConnectionStatus = async () => {
    try {
        const isConnected = await RNIap.initConnection();
        console.log('App Store connection status:', isConnected);
        // isConnected will be true if the connection is successful
      } catch (error) {
        console.log('Error checking App Store connection:', error);
      }

  };

  and the error E_IAP_NOT_AVAILABLE appears can someone help me?

this solution is not working even i put the code in to the connected condition but the app is crash after buy the subscription from the android app


Alpha releases not shown, list broken

The regex picks only the first part of the release without considering the alpha. This doesn't show the alpha releases and breaks the remote list since 0.12.0 does not exist yet.

@ntrp see #94


Password component not displayed properly on IOS14 and Mac OSX 12

@freenow/wave version: latest (1.27.0)

Relevant code
<Password
                        id="text-field-password"
                        name="password"
                        variant="bottom-lined"
                        ...
                    />

Issue
Password component is not working fine on IOS 14 and Mac OS 12.0.1 with Safari 15.1. The main issue is that the eye icon is located at the start of the component not at the end.
What was expected to happen?
Password component should be displayed properly in all browsers and SO versions.
Reproduction

Use an old device with IOS 14 or Mac OS 12.0.1
Open https://wave.free-now.com/components/password and check bottom-lined variants

Media

Hi @kasas, thanks for opening the issue.
I could reproduce the issue using MacOS 12.1 + Safari 15.2.
Apparently it is a know browser support issue (that could affect other engines and versions too):

https://caniuse.com/mdn-css_properties_align-items_flex_context_start_end

Then, apparently the solution would be changing the align-items in the ToggleButton property to use flex-end instead of just end. But this needs to be properly tested.
Stay tuned :)


ColorPicker slider tweaks

This PR does two things:

Makes the sliders 1px taller/wider (from 11px to 12px) so that they align nicely with the 18px knobs

Adjusts some properties of the vertical picker to match the new horizontal one. There should now be the same spacing around the sliders.

@gabrielconl can you provide before and after screenshots?

/azp run

@karenbtlai can you weigh in?

@gabrielconl Let me check if these visual tweaks are up to spec with the Figma design guidelines

Double checked with the Figma design comps, looks great!


Spellchecking warnings for certain tag names (to catch typos by users)

So I, and previously 90 other people, misspelt pavilion with two L's while tagging in OSM (on my part because it didn't show in the drop down of the building key, yes I probably should have use a preset or noticed it didn't flag one).
So I've created https://github.com/openstreetmap/iD/pull/7749/files which I think will fix the outstanding ones.
I've also done a codespell ( https://github.com/codespell-project/codespell/ ) run across the repo and fixed the obvious issues there in #7752 .
However it seems to me there are options to possibly improve the user tagging experience (and stop typo tags gaining traction), by effectively spellchecking a subset of the tags, probably simply based upon an approved list of possible typos.
For example take the codespell dictionaries:
https://github.com/codespell-project/codespell/blob/master/codespell_lib/data/
And do a reverse lookup against the presets for any possible typos in keys or values and just use them (which avoids a new tag which can appear as a typo being incorrectly flagged). Obviously don't check Name/Brand/Operator etc (or any of the address bits). Perhaps as a safer option just check tags which exist in the presets or something. So for example because there is a preset of building=pavilion, you'd search codespell for typos for building and find:
buiding->building
buidling->building
bulding->building
buliding->building

And pavilion and find:
pavillion->pavilion
Therefore if I type any of the words on the left, it flags an issue that I probably mean the RHS.

@peternewman This sounds cool in theory. I'm not sure if it'd be useful in practice—it might be! I'm a bit worried about the size of shipping a spelling dictionary in iD or the complexity of calling out to an API.
Generally I imagine that mappers use either iD's presets or TagInfo suggestions for selecting tags, so in either case the spelling is handled for them. Do you have any sense of how widespread spelling problems are? A few hundred misspelled tags per year would be regretable, but probably not a major issue.
#4579 is about flagging tags that don't appear in the OSM database yet… perhaps that would be sufficient?

@peternewman This sounds cool in theory. I'm not sure if it'd be useful in practice—it might be! I'm a bit worried about the size of shipping a spelling dictionary in iD or the complexity of calling out to an API.

As mentioned, if you only pick "relevant" words and filter the dictionary the resulting file shouldn't end up too large. I'd agree calling out to an API is probably more hassle than it's worth.

Generally I imagine that mappers use either iD's presets or TagInfo suggestions for selecting tags, so in either case the spelling is handled for them.

I'd agree iD presets should be fine (or can be fixed and typos handled at source). You have to use TagInfo for stuff like my ramp=separate as there aren't presets for it, and I don't think presets would really make sense. The problem is that TagInfo is the source of the problem:
https://taginfo.openstreetmap.org/keys/?key=ramp#values
I'm not sure it's possible to pick a level where typos like sepErate are ignored without filtering out some possible but infrequent suggestions too. E.g. the value you've picked in https://github.com/openstreetmap/iD/issues/7203 won't work for this case. There's a chance it might have if it was in from the beginning, but that doesn't cover all the other editors.

Do you have any sense of how widespread spelling problems are? A few hundred misspelled tags per year would be regretable, but probably not a major issue.

I'm not sure off-hand. If there's an easy way to dump the key-value pairs from OSM it would be pretty easy to generate some general stats on it.

#4579 is about flagging tags that don't appear in the OSM database yet… perhaps that would be sufficient?

That looks like that's primarily keys not values?

#4579 is about flagging tags that don't appear in the OSM database yet… perhaps that would be sufficient?

That looks like that's primarily keys not values?

I proposed starting out with keys, but in principle the same mechanism could be extended to values if we can reliably distinguish enumerated keys from freeform keys: https://github.com/openstreetmap/iD/issues/4579#issuecomment-718311982.


[QA] Consider using more specific roles

Currently all states have role "value".
Consider to use more specific roles (such as value.voltage, ...) if available.

Implemented at 1.0.0


Provide setup.py

As this is all Python code, this should be pretty trivial. It would just be nice to have the standard method of installation supported.

Completed in this commit ( https://github.com/jakirkham/nanshe/commit/6ec8d626b127add9c8fe9a1c59e5f09f3268e54e ).


Builders : create sandbox

create sandbox for the following  builders :
BuilderBitcoin
BuilderEthereum
BuilderRipple
BuilderMinio
BuilderRestic
BuilderSyncthing
BuilderOpenResty

@Dinaamagdy , please update this card

finished and can find code there
8fe86d202d74fe4e38e614a1924ae4f6ae3ce89c


Fix OCP HSTS errors

Issue
When we access the ocp console, then we got such a message from google chrome
You cannot visit oauth-openshift.apps.ocp.snowdrop.dev right now because the website uses HSTS. Network errors and attacks are usually temporary, so this page will probably work later.

HSTS: https://developer.mozilla.org/en-US/docs/Glossary/HSTS
Temporary workaround is to type thisisunsafe within the google chrome window - https://stackoverflow.com/questions/33268264/chromethe-website-uses-hsts-network-errors-this-page-will-probably-work-late

Dont forget to add the link to the issue/PR to track that from your tasks ;-)

Can you add the link to the ticket created please ? @jacobdotcosta

https://redhat.service-now.com/surl.do?n=RITM1483142

I think that I know how to fix it.
We dont have issues when we access https://console-openshift-console.snowdrop-eu-de-1-bx2-4x16-0c576f1a70d464f092d8591997631748-0000.eu-de.containers.appdomain.cloud/ as their HTTPS certificate has been signed for the domain *.cloud by Let's encrypt - https://letsencrypt.org/certificates/#intermediate-certificates
-----BEGIN CERTIFICATE-----
MIIGRzCCBS+gAwIBAgISBIq2+AqEbznEOBnuHHqEpCBdMA0GCSqGSIb3DQEBCwUA
MDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD
EwJSMzAeFw0yMzA0MTMwNDEzNDdaFw0yMzA3MTIwNDEzNDZaMEUxQzBBBgNVBAMT
OnNub3dkcm9wLWV1LWRlLTEtYngyLTR4MTYuZXUtZGUuY29udGFpbmVycy5hcHBk
b21haW4uY2xvdWQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCZTx3I
Pgf1fn6i+oHSh5IwdjBn/BGSWkXXAbMJS+1myHKEczlKfR3xG1Fdetx657SPqHEY
YqAmpISR8aAnQBYFje1Bk7dZ4LkygbMUWw+r994tkHwoioRxCcsGcUwBtog2r5Ta
/MR6pkwipFY4qJ/zN2cIkRXAePy6r9AElSqoWtlfn7SAf/ENC4Ur0c5xwZs5pSPA
6/0oxaEwQvMqyVrhpreH9tpkFQQhoQJTht8EFzRBScua9mxztDvt6jhVSGLjbMBR
aV2Vwy5YEJsgtRhXGlBqTfBzBao8P2YAIg79ISrKmTXsXyJ7/OeGWJ30gSqnxW1K
Kcct/FQ8lkNwpIbXAgMBAAGjggNCMIIDPjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0l
BBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYE
FDhoxA4/oeUxzpSEcqSq4M3e3aFBMB8GA1UdIwQYMBaAFBQusxe3WFbLrlAJQOYf
r52LFMLGMFUGCCsGAQUFBwEBBEkwRzAhBggrBgEFBQcwAYYVaHR0cDovL3IzLm8u
bGVuY3Iub3JnMCIGCCsGAQUFBzAChhZodHRwOi8vcjMuaS5sZW5jci5vcmcvMIIB
DwYDVR0RBIIBBjCCAQKCYiouc25vd2Ryb3AtZXUtZGUtMS1ieDItNHgxNi0wYzU3
NmYxYTcwZDQ2NGYwOTJkODU5MTk5NzYzMTc0OC0wMDAwLmV1LWRlLmNvbnRhaW5l
cnMuYXBwZG9tYWluLmNsb3VkgmBzbm93ZHJvcC1ldS1kZS0xLWJ4Mi00eDE2LTBj
NTc2ZjFhNzBkNDY0ZjA5MmQ4NTkxOTk3NjMxNzQ4LTAwMDAuZXUtZGUuY29udGFp
bmVycy5hcHBkb21haW4uY2xvdWSCOnNub3dkcm9wLWV1LWRlLTEtYngyLTR4MTYu
ZXUtZGUuY29udGFpbmVycy5hcHBkb21haW4uY2xvdWQwTAYDVR0gBEUwQzAIBgZn
gQwBAgEwNwYLKwYBBAGC3xMBAQEwKDAmBggrBgEFBQcCARYaaHR0cDovL2Nwcy5s
ZXRzZW5jcnlwdC5vcmcwggEFBgorBgEEAdZ5AgQCBIH2BIHzAPEAdwC3Pvsk35xN
unXyOcW6WPRsXfxCz3qfNcSeHQmBJe20mQAAAYd5CLg8AAAEAwBIMEYCIQDknrov
P4dsaO9cowbaK+W8qnFXlw2CXWmDqCga4jjvJgIhALDONveWD9P133Lcozni7WIT
Pt22QP4tj8zM7DQw0gzdAHYAejKMVNi3LbYg6jjgUh7phBZwMhOFTTvSK8E6V6NS
61IAAAGHeQi4TAAABAMARzBFAiEAxpLBPpag94JhLAf52vnYg0ShaQcBrQ5D9dkE
DcDHSCUCIGzt0Y+JaJN+0lvhZtoYLok8jTMJeFWI4tHxTkkGsgoQMA0GCSqGSIb3
DQEBCwUAA4IBAQCCQQ2GI1EkukC1GLUKpRcB2d7a0QrW1eu0qHOmyaH44G1Fii+X
DEUXVe93m9nROyG0ZdFhvxIHVuIylH31Q3UEOE0DtMHT3pYCzg+vs93jIFPXXL1C
1f52mt0TKsGnnPxUzHI0CqWZ4YKIAP+QURLVURQoe5YlvqMC3Mn0mW7tZKdrlnil
GnrXsveCz6oKbAtvoP8bMGWWsltrMjUZHZOB6lOvcQJoocxDZfCdHBoMjL+SugZ5
4DCqWHueRJc7o4Vdxcq3gNuCJ8YrYP7V3hZ4ustjBSPQBdlcBezmSuJ/DuQwCok2
TAMzaIP3LnDk+uYowmfELaIH3q+t7lj7HION
-----END CERTIFICATE-----

instead the certificate generated by the ocp ingress operator for us
    -----BEGIN CERTIFICATE-----
    MIIDZTCCAk2gAwIBAgIIM5L+uC/xI+YwDQYJKoZIhvcNAQELBQAwJjEkMCIGA1UE
    AwwbaW5ncmVzcy1vcGVyYXRvckAxNjgwMDkzMzc3MB4XDTIzMDMyOTEyMzYxN1oX
    DTI1MDMyODEyMzYxOFowIjEgMB4GA1UEAwwXKi5hcHBzLm9jcC5zbm93ZHJvcC5k
    ZXYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDrL8TyhxSjXY91I8lD
    JmRmjTQddf6kVzD4i8SFUY9Oi+ftYetb8z4sDVz6oq+85AIqDiH4TliqM5PAiL9F
    Q33miAdxOoF42S1a0LQpzDs/gt3VTLIls1/IFo4iA1KbnmuNNbDWZ1Ofe+twTwSA
    0HEODhCzzsVS6Oz+vUZIwWoY6gQET8XymhoA14Vu6GQPG1SjC6SRat7263A61GNA
    82Yt7MsANqkzR88r0FVLpuvGeX/2d2kwmIv1ZTpdAomJTd1o/gcuC2QA7DuAa9b3
    Mv+0wUjGTgZUa8+tbshEWlJ+cCQnFemyTooR7cUAw0jjTlhq32JWFQW08jV7EJwl
    jS2/AgMBAAGjgZowgZcwDgYDVR0PAQH/BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUF
    BwMBMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFJMlo5jao13Eia1IqeaL+V6pqrsG
    MB8GA1UdIwQYMBaAFHHVWLJXMatLkpvA69XC5n2uW0Q5MCIGA1UdEQQbMBmCFyou
    YXBwcy5vY3Auc25vd2Ryb3AuZGV2MA0GCSqGSIb3DQEBCwUAA4IBAQCTeuG5pMwg
    KcTdc/k3EMDIECX9OHZoNKl/4uVyILMyfOlC2y2qE0vhzpwT949Be4/l/cZHtLmQ
    3HnHwbsbS1p4D50/ByrSA50GDQkwd+80yMK14RMzQqv6N/3kX/6k/ss65fZygxTw
    Tw2Qk4ITq/p4h/O9rpqqf5PRHkhGkjfQN6iPDXgeImRjUo32BAjypC7cGGqjwo4P
    C5KTHHYBth/LBFyvQos/k4IaJ/qS1Ys6eNLR6NFcwy9LgbEadjGB2Gn+r3AbriQq
    NYsrp8tvbAdAg0TyngnGcnQfuKXI/rkxYxHPh4e6/kI+hzwZ+YzeP9X/pzZq8ZvP
    B9J1OVll7vas
    -----END CERTIFICATE-----

So, if we ask to Let's encrypt and Godaddy to sign a Certificate request for *.apps.ocp.snowdrop.dev, that should work.
The next challenge will be to pass such a certificate within the Openstack ocp install config file. Maybe using: https://docs.openshift.com/container-platform/4.13/installing/installing_openstack/installing-openstack-installer-custom.html#installation-osp-describing-cloud-parameters_installing-openstack-installer-custom
WDYT ? @jacobdotcosta

I tested manually this procedure after updating the certificate and issuer role of k8s-infra, collected the updated secret and patched as described here: https://docs.openshift.com/container-platform/4.13/security/certificates/replacing-default-ingress-certificate.html#replacing-default-ingress_replacing-default-ingress
Now, the access to https://console-openshift-console.apps.ocp.snowdrop.dev/dashboards do not generate a HTST error ;-)

A part of the problem could be automated if we pass to the openshift installer config file the parameter additionalTrustBundle
See how that works here: https://github.com/openshift/installer/blob/master/docs/user/customization.md#proxy which corresponds to what it is described here: https://docs.openshift.com/container-platform/4.13/security/certificates/replacing-default-ingress-certificate.html#replacing-default-ingress_replacing-default-ingress (create a custom CA secret and patch proxy/cluster)
NOTE: We need of course to populate first and separately the CA crt and keys before to create a cluster !
@jacobdotcosta

I still have an issue using such certificate/issuer
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
  name: letsencrypt-prod-qshift-snowdrop-dev
  labels:
    app: qshift-ca-cert
  namespace: snowdrop-site
spec:
  acme:
    server: https://acme-v02.api.letsencrypt.org/directory
    email:
    privateKeySecretRef:
      name: letsencrypt-prod-snowdrop-dev
    solvers:
      - dns01:
          webhook:
            config:
              apiKeySecretRef:
                name: godaddy-api-key
                key: token
              production: true
              ttl: 600
            groupName: acme.mycompany.com
            solverName: godaddy
        selector:
          dnsNames:
            - 'api.qshift.snowdrop.dev'
            - 'oauth-openshift.apps.qshift.snowdrop.dev'
            - 'console-openshift-console.apps.qshift.snowdrop.dev'
            - 'grafana-openshift-monitoring.apps.qshift.snowdrop.dev'
            - 'prometheus-k8s-openshift-monitoring.apps.qshift.snowdrop.dev'
            - 'integrated-oauth-server-openshift-authentication.apps.qshift.snowdrop.dev'
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: qshift-snowdrop-dev
  labels:
    app: qshift-ca-cert
  namespace: snowdrop-site
spec:
  renewBefore: 2136h
  duration: 2190h
  privateKey:
    size: 2048
    algorithm: RSA
  issuerRef:
    kind: Issuer
    name: letsencrypt-prod-qshift-snowdrop-dev
  secretName: qshift-snowdrop-dev-tls
  dnsNames:
    - 'api.qshift.snowdrop.dev'
    - 'oauth-openshift.apps.qshift.snowdrop.dev'
    - 'console-openshift-console.apps.qshift.snowdrop.dev'
    - 'grafana-openshift-monitoring.apps.qshift.snowdrop.dev'
    - 'prometheus-k8s-openshift-monitoring.apps.qshift.snowdrop.dev'
    - 'integrated-oauth-server-openshift-authentication.apps.qshift.snowdrop.dev'

Problem fixed after issuing the following certificate
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
  name: letsencrypt-prod-qshift-snowdrop-dev
  labels:
    app: qshift-ca-cert
  namespace: snowdrop-site
spec:
  acme:
    server: https://acme-v02.api.letsencrypt.org/directory
    email:
    privateKeySecretRef:
      name: letsencrypt-prod-snowdrop-dev
    solvers:
      - dns01:
          webhook:
            config:
              apiKeySecretRef:
                name: godaddy-api-key
                key: token
              production: true
              ttl: 600
            groupName: acme.mycompany.com
            solverName: godaddy
        selector:
          dnsNames:
            - '*.apps.qshift.snowdrop.dev'
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: qshift-snowdrop-dev
  labels:
    app: qshift-ca-cert
  namespace: snowdrop-site
spec:
  renewBefore: 2136h
  duration: 2190h
  privateKey:
    size: 2048
    algorithm: RSA
  issuerRef:
    kind: Issuer
    name: letsencrypt-prod-qshift-snowdrop-dev
  secretName: qshift-snowdrop-dev-tls
  dnsNames:
    - '*.apps.qshift.snowdrop.dev'

Question from Antonio: To install the new cert manager on the OCP cluster we would still need the one on the snowdrop k8s server right?
Charles's response:
No.
It is not needed to centralize everything on a cluster EXCEPT when rotation will take place and when secrets (= ca, tls) are still used.

So if we don't centralize, that means that we need to find a way to "copy/scp" the secret or rotated secret to the target cluster
If we install a cert manager / cluster, then it can also manage the rotation and save locally the secret. If the cluster is then removed, no need anymore to rotate the cert as needed by letsencrypt after 3months

@jacobdotcosta


Tunnel stuck on my setup

Hello guys,
I'm having a problem here, I'm trying to test my program with saucelabs-mocha task but the connection to the sauce labs tunnel just keeps hanging, it says the testing process started by never close the tunnel and from the sauce labs console I get this odd message:
Automatic Tunnel: Jobs will not proxy through this tunnelunless the right identifier is provided.
I think it's something related to the tunnel ID, anyone else having this problem?

this happens to me also on openpgpjs: https://travis-ci.org/evilaliv3/openpgpjs
how did you manage to solve your issue @mkautzmann ?

@evilaliv3 I actually didn't, my project is mainly web component focused so I decided to use Polymer's Web Component Tester, that project has a plugin for sauce labs called wct-sauce. I still don't know why their method is working on my environment and grunt-saucelabs is not.


Build fails, tries to load local npm lib

Followed readme instructions and everything built but this:

npm install
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "link:": link:@noble/hashes/sha256
npm ERR!      /Users/rabble/.npm/_logs/2023-03-01T21_22_05_923Z-debug-0.log
pnpm install
Lockfile is up to date, resolution step is skipped
Already up to date
 > WARN  Local dependency not found at /Users/rabble/code/experiments/nostr-proxy/@noble/hashes/sha256
Done in 1.1s

What is your version of nodejs?
Also, what is this npm install at the beginning? This project uses Pnpm instead of npm or yarn

try "pnpm rb"
rebuild


Windows Terminal not 100% shown in context menu

Windows Terminal version
1.14.1861.0
Windows build number
10.0.22622.290
Other Software
No response
Steps to reproduce

Install windows terminal 1.14.1861.0
Right click in some folder
The bug happens.

Expected Behavior
The "open in terminal" should display every time.
Actual Behavior
The "open in terminal" don't display every time. I can see it 1 time when I right click every around 6 times.

Maybe related to powertoys as it happens just after powertoys updated to 0.60.x

Hmm, that sure is weird. Can you file feedback using the Feedback Hub, under the "Desktop Environment > Right Click Context Menu" area/?

I'm not sure there's much we can do to investigate here, but getting this to the team that owns the context menus might help the investigation. If you "Share" the aka.ms link to that feedback here, I can make sure to follow the internal bug that gets generated. Thanks!

Now I uninstalled powertoys, things looks ok. Will test again by reinstall powertoys.

I am very sure this problem is related to the latest version powertoys. If you want to fix it, you just need turn off Power Rename and Image Resizer.

2 of 3 reasons I use powertoys are power rename and image resizer. So your fix seems painful for me...

I'm gonna tentatively say that this is tracking upstream. If this comes back as not a PowerToys AND not an OS issue, then we can reopen if there's something for us to fix here. Thanks for following up!

I'm actually gonna reopen this. We've got like, a LOT of crashes in OpenTerminalHere::GetState
There's no internal bug for this yet (weird), but it is in 33573326-3f07-2517-b549-6f77533ee596.
https://github.com/microsoft/terminal/blob/4e5a0c137b045d9f1f34114d12bc3b0ed0a03800/src/cascadia/ShellExtension/OpenTerminalHere.cpp#L100-L129
Maybe there's a way for the array to be non-null but have 0 items in it?

Promoted to MSFT:40872815
probably regressed in #13206

I'm pretty sure that we fixed this in https://github.com/microsoft/terminal/releases/tag/v1.15.2282.0 by reverting #13206. Thanks all!


Create empty lockfile if it doesn't exist

If the lockfile does not yet exist on disk, or if it is not readable, try to create an empty file.

[ ] Test case
[ ] Logging?

For one-off usages, like the one described in https://github.com/hendrikmaus/actions-digest/blob/main/docs/how-to/Dependabot.md, the user should be able to prevent the lockfile creation altogether. Maybe using --no-lockfile?


Explicitly add jgit ssh dependency

At some point in my many reconfigurations of my dev environment, git updating just totally stopped working for me. It turns out that the SSH part of JGit can sometimes not be present, which results in a misleading error about timeouts. Explicitly depending on the library fixes this. I had previously kept it in my local changeset but I have now heard reports of others having this issue.

@midgleyc I'm using Java 17


MGMT-15882: Cluster and domain renaming

Providing to recert new cluster name and domain
Adding dnsmasq custom.conf in order to support new domain.

/lgtm

/assign @donpenney


Unknown ICD9 Codes

I noticed that there are some codes that do not seem to be ICD9 icd 9 diagnosis codes in the diagnosis.csv.gz file, (e.g "I25.10","J44.9") among others. The ones that are not ICD9 appear to be ICD10.
I am using icd.codes to check the codes.
Any input on this ?

Yes, the ICD codes, when available, may be ICD9 or ICD10. I believe ICD9 does not include any letters, so some basic regex should be able to select ICD9 or ICD10 as needed.


Select the desired class list when entering a quest node

Hi, could you add a function to select the class list you want?
For example, i want to farm a Rider node, so the friend list automatically points to Assassins, and i need Chaldea Lunchtime which can be found normally in Casters
Or i need a MLB CE which is easily found in the ALL section instead of combing through every class list

Duplicate of #35
Already done in #232


[Q] How to use API to edit job_type?

Using a script similar to the one below, I can edit group names, but not job types. I also see that job_type is not listed in the wandb.Run API. Is it possible with the API, and if so, how?
api = wandb.Api()
runs = api.runs(path="{}/{}".format(wandb_username, project_name))

for run in runs:
    run.job_type = new_job
    run.update()

Hi Leslie, thank you for the quick reply. My project currently contains multiple tasks, models, and number of outputs for each model. I'm currently using:

Groups to differentiate between tasks (same dataset, but different labels)
Tags to differentiate models
And wanted to use job type for number of outputs (2, 3, 5, etc.)

Previously I used tags for everything, but that resulted in too many tags. I've considered using groups to differentiate between task and number of outputs (eg. Task 1 - 2 outputs, Task 1 - 3 outputs, Task 2 - 2 outputs, etc.), but thought I should ask if there was a way to change job type first.

Hi, sorry for the late reply. Thank you for your advice on using tags instead. I have considered that, but quite liked the min-max range for the graphs when grouping by "Group" and "Job Type". As edit job type isn't possible, I'll stick to using tags for now.

Is there a timeline for implementing editable job_type?
Tags and notes are not as useful as the job_type field because I cannot sort or group by them.
It seems quite strange that editing the job type is prevented.
Alternatively, is there a way to upload an a new run (with the correct job_type in place) containing all the data from an existing run?
Thanks.


[docs] Link RootRef in the FAQ

Updates FAQ per #11848. Sorry for the delay!

@scottastrophic Thank you :)


Localized permissions

Localized permissions component by adding page titles.

Codecov Report

Merging #2144 (c66463c) into react-intl_changeover (03ca5b4) will not change coverage.
The diff coverage is n/a.

@@                   Coverage Diff                   @@
##           react-intl_changeover    #2144    +/-   ##
=======================================================
  Coverage                  70.24%   70.24%
=======================================================
  Files                        409      409
  Lines                       7501     7501
  Branches                    1592     1457   -135
=======================================================
  Hits                        5269     5269
- Misses                      2198     2200     +2
+ Partials                      34       32     -2

Impacted Files
Coverage Δ

src/components/charts/costChart/costChart.tsx
10.76% <0.00%> (ø)

...omponents/charts/dailyCostChart/dailyCostChart.tsx
9.09% <0.00%> (ø)

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 03ca5b4...c66463c. Read the comment docs.


Ability to configure maxCrumbs for BreadcrumbStore?

From the Official document of Cocoa [https://docs.sentry.io/clients/cocoa/advanced/#breadcrumbs]
It said

The client will queue up a maximum of 20 breadcrumbs by default.

Is there any public method to change the maximum value?

Hey
We will add this in the next release!

Version 2.1.0 has just been release ... the maxCrumbs var is now exposed.


Added example secret yaml

Added secret example and mention within it that the access token needs to be base64 encoded.
Signed-off-by: David McLean<EMAIL_ADDRESS>

/assign @meyskens

/ok-to-test
/approve
/lgtm


Should _extractTimeStamp be _extractTimestamp on line 168?

I really don't understand js, but can't see any other references to the uppercase version in the code

Variable names can be chosen freely in JS. The different spellings basically happened because multiple individual people worked on this plugin.


Add an option for Global classes

OK, I was thinking you could implement a way for:
// I was thinking of a [Global] attribute.
public static class App
{
[Ready]
public static void Main ()
{
Console.WriteLine("Hello World");
}
}

would compile to
function Main ()
{
     console.log("Hello World");
}
Bridge.ready(Main);

In 15.0, [GlobalMethods] #1589 and [Mixin] #1639 implemented.


Incorrect MAC address

Maybe it is a KEF bug, but if I query the MAC address it is different from what I get when reaching over the network.
The last 2 bytes differ.
Python

from pykefcontrol.kef_connector import KefConnector
my_speaker = KefConnector("<IP_ADDRESS>")
my_speaker.mac_address
'84:17:15:15:YY:ZZ'

Or browser
http://<IP_ADDRESS>/api/getData?path=settings:/system/primaryMacAddress&roles=value
[
{
"type": "string_",
"string_": "84:17:15:15:YY:ZZ"
}
]
But from the terminal

ping <IP_ADDRESS>
<...>
arp -a
(<IP_ADDRESS>) at 84:17:15:15:WW:XX [ether] on eno1

This is also reported by the fing app on my smartphone
Anyone else experiencing this?

Ok I found the MAC returned is for the physical interface while I am using the wireless interface.
This makes sense.
See:
http:///api/getData?path=network:info&roles=value

I see the same thing on my LSX 2 speakers, but it is not just the API returning the wrong data; the web page (/index.fcgi) shows the wrong MAC address as well.
So to be clear: both the API and the index.fcgi return the MAC of the Ethernet port, regardless of whether LAN or WiFi is being used.
For the API you could imagine that the LAN interface is simply always referred to as 'primary', but the index.fcgi shows a bunch of WiFi related settings (such as SSID, BSSID and Encryption) but then shows the LAN MAC instead of the WiFi one.
I (attempted) to create a bug report for KEF - probably it will end up in some marketing mailbox, where it will not neatly fit into one of the available categories and get discarded.

@Vic-s and @mjbrands,
Thank you for bringing up this issue! As I primarily use my LS50W2 via Ethernet, I wasn't aware of this behavior. While there might be a straightforward method to identify the wireless interface MAC address from the wired MAC address, I haven't yet searched how to determine the active interface.
Please inform me if this issue is crucial for you and I will have a look. On the contrary, at the moment, I am not planning to invest time in debugging this.

Hi Robin,
To be honest, I think this is a bug in the firmware and not your firmware.
My reason for saying this is that the web page also shows the wrong MAC
address.
If KEF (ever) fixes this, then your library already does the right thing.
For me this is not an issue, more of an annoyance (with the speaker).
I my case, the two MAC addresses differ in the last two octets - they're
not subsequent like you often see in switches and they also don't have a
different vendor ID (which you see often on laptops - LAN MAC has Dell as
the vendor and WiFi MAC has Intel).
Cheers,
Mathijs
On Sun, 12 Mar 2023, 17:56 Robin Dupont, @.***> wrote:

@Vic-s https://github.com/Vic-s and @mjbrands
https://github.com/mjbrands,
Thank you for bringing up this issue! As I primarily use my LS50W2 via
Ethernet, I wasn't aware of this behavior. While there might be a
straightforward method to identify the wireless interface MAC address from
the wired MAC address, I haven't yet searched how to determine the active
interface.
Please inform me if this issue is crucial for you and I will have a look.
On the contrary, at the moment, I am not planning to invest time in
debugging this.
—
Reply to this email directly, view it on GitHub
https://github.com/N0ciple/pykefcontrol/issues/3#issuecomment-1465247295,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB5AVK6RUWOBNBEZSDUGVQLW3X55XANCNFSM6AAAAAATP4W4TI
.
You are receiving this because you were mentioned.Message ID:
@.***>


obtw u ruined serialization between an old version and your new version.

You introduced a parameter in the WorldContainer, which will break serialization. GG WP NO RE.
Fix:
Make sure you can serialize between the old game and the new game.
Timeline:
Like, maybe when I get to it?

smh you did it again


Quilt support?

quiltet fabric loader does utilize 0.91.0 not 0.92.0

You can override this and the game will start, but it seems none of the recipes or additions from this mod actually work on quilt when doing that.

Update, QFAPI update and now this mod does work on quilt.

Great, I'll close the issue

Actually, it looks like the conduit channeling recipes don't work. They don't even show up in REI.
The other recipes do load in and work though.

The recipes for conduit channeling don't seem to show in REI. They do work though.

REI and EMI require custom code, I need to look into it later


no gulp/grunt option

i just installed the keystone generator and when i run it i get no option for installing gulp/grunt, is there a different version? i did install generator-keystone

Hi @juan-ruiz, sorry for the confusion. We removed gulp and grunt as features that the generator is supporting as of v0.5.0. Sorry this hasn't been clearly indicated!
If you can, can you tell me what documentation still mentioned the gulp and grunt feature?

not really official sources, i saw it on independent blogs and youtube channels, thanks for the heads up anyway! a notification of this on the release notes would be fine!
Again, thanks!

We've just started formatting them here, but you can find our release notes here.


can you delete something i posted accidentally

(Original issue 1166 created by None on 2015-11-09T20:32:56.810487+00:00)
i uploaded something by accident on http://pygments.org/demo/3006560/  , could you please delete it

(Original issue was assigned to mitsuhiko)
(Original issue 1166 last updated on 2016-01-16T11:25:22.317349+00:00)
(Issue automaticaly closed due to status in Bitbucket: resolved)