-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat]: Add option to choose between worker-timers and native timers #1806
Comments
@olso-nordsec Wondering if webworkers do have support for setTimeout and clearTimeout ? |
@robertsLando yea, they work i can't fully understand the log, but you are not seeing any pings right? |
@olso-nordsec I tested it in my webworker tests and it's working well, see #1807 . I think there might be some issues in your worker setup maybe? How do you spawn your web worker? |
btw, this is happening on firefox only there is not concept of "spawn", since that is handled by browser (this is hapenning in mv3 browser extension) maybe if you point me to specific places, i can add breakpoints and see whats up |
BTW the tests runs on FIrefox/Chrome and Webkit (safari) so maybe it's the firefox version the problem |
I thought about that but in that case you should get an error on worker as it would try to use worker timers and that's not allowed inside a worker. Could you tell me how to correctly identify web worker in firefox, at least on your firefox version? |
@olso-nordsec News on this? |
it would be extension specific code tho, afaik, there is no other clear way to detect it in MV3 firefox i'm thinking maybe it could be a config option? |
What do you mean with |
For example, in firefox, checking if |
Is there any related doc? |
Sorry there are no official docs on this, and also its a very bad time, because docs are being rewritten from MV2 to MV3, but I had a look around github https://github.com/fregante/webext-detect-page/blob/main/index.ts this one seems to have pretty good detection (even false positives on firefox) but i would understand if you wouldnt want to include this monstrosity in your codebase or as a dependency thats why i suggest a config option that would get passed down to |
Oh ok now that's more clear what you meant. I can do that :) |
hey @robertsLando |
@olso-nordsec not yet, sorry! Feel free to open a PR 🙏🏻 also remember to add a test |
@robertsLando i've tried running test on fresh clone, and im getting these
|
@olso-nordsec Tests are a bit flaky and I sitll don't understand why, they just fail for no reason sometimes, ignore them for now |
MQTTjs Version
5.3.6
Broker
rabbitmq with cowboy
Environment
Browser
Firefox 123.0, running inside MV3 browser extension (service worker -> the one without
window
)Description
I think it got broken by this #1779
Our server closes the connection after 60s, because there are no pings
Then new connection is opened
Our keep alive is set to 30s
We've always used 30s
Minimal Reproduction
Debug logs
The text was updated successfully, but these errors were encountered: