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
Only some lines of tridactylrc are executed #1409
Comments
Hi, thanks for reporting this issue. It does sound like a race condition and also a lot like #1197. What Firefox and Tridactyl versions are you using? |
|
I am trying to wrap my head around how this can be. Is this a function of the asynchronous code and promises? If so, would be it possible to employ a semaphore of sorts to ensure that the code is executed as a transaction? |
It must be a race condition, yes. We even added a 100ms delay between lines to try to ameliorate it. It would be quite straightforward to set up a failing test for it as we can just include an RC file as a string - tridactyl/src/background/config_rc.ts Line 45 in ae40375
I suspect the race condition is in config.set - but I'm not sure. I think #1764 was trying to do that. A lock could help :) |
#1764 has quite a lot of useful information in it. The trouble is that we are using the browser storage to synchronise configuration between tabs via an I think we need to stop using Line 1645 in ae40375
|
If anyone is interested in removing onChanged, it might be easier to remove it from state.ts first as that is a far simpler object - Line 65 in ae40375
|
It would be nice if #2137 has fixed this. Could someone try the latest betas once this message is >10 mins old and report back? |
5% of your issues, @zsugabubus, are probably because we don't support inline comments in the RC file (yet) - set mysetting blah " this isn't a valid comment
" this is the only kind of comment we support in the browser, |
Thanks for the info, but I used these comments only to make the report look nicer. |
I've installed the beta version (1.17.1pre3587-fe39c3e is the correct one, right?) but I still have only a parts of my tridactylrc loaded. |
Yeah, that's the right version. Back to the drawing board it is then :) Thanks for checking. |
Thanks for making the effort to fix this 👍 |
I think the next thing to try is to replace Line 89 in fe39c3e
|
I'm not sure I get what the patch really do. As was stated, the The current Anyway, for the issue on tridactylrc with A straight forward fix will be a |
#2181 is my current attempt. It tries to guarantee that |
Aha, I can reproduce this, sort of. With
means that, after a short while, However, if I remove either It seems likely that the race condition is therefore between |
It gets stranger:
works on a fresh profile, until I run Even more weirdly, on a fresh profile:
|
`tridactylsync` is for Firefox sync data, which I don't use. However, even sanitizing the local config is asynchronous¹, so I'll have to do it manually. ¹ tridactyl/tridactyl#1409 (comment)
Ok, so... first of all sorry for opening a new issue (maybe relates to #469), but I think it deserves a separate page. This issue made me crazy.
After three days of frustration I finally shrinked down my
tridactylrc
to this:I just couldn't imagine before, why my bindings aren't working for days. Guess what happens: only starred lines gets executed (i.e. every second). "Impossible." - I said. If I comment out "storageloc" line, or set it to "sync" it seems to work--however I don't use Firefox sync at all, so I don't know if it should make any difference by the way.
I was curious, so I went one step further to discover what happens to other lines.
After a few hundreds of restarts here's my result. Sometimes just starred or plus signed, BUT sometimes all lines (except "g9" of course) get executed (!!!).(Numbers mean nmap order I saw from
:viewconfig
.)I don't know if it makes any sense in the context of JavaScript, but as I see it must be some race condition in the background, so I feel that I should also mention that my whole Firefox profile lives in RAM.
The text was updated successfully, but these errors were encountered: