Skip to content
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

autoSync feature stops working after 1st config upload #19

Closed
bc547 opened this issue Mar 8, 2024 · 2 comments · Fixed by #16
Closed

autoSync feature stops working after 1st config upload #19

bc547 opened this issue Mar 8, 2024 · 2 comments · Fixed by #16
Labels
bug Something isn't working

Comments

@bc547
Copy link

bc547 commented Mar 8, 2024

Hi,

I can't get automatic syncing of profiles and connections to work. Only after closing and restarting Tabby, the new config is downloaded and applied only once.

When I open the developer tools window in Tabby, I can see at startup a new config is downloaded and applied, followed by a config upload. This upload is done via a http PATCH request. (See https://github.com/Eugeny/tabby/blob/fc72b4d160f606d06c015f50f1829a9491ae3dd2/tabby-settings/src/services/configSync.service.ts#L101 )

However, rtabby-web-api does not return any data with PATCH request (0 content-length, See https://github.com/Clem-Fern/rtabby-web-api/blob/master/src/routes/config.rs#L99 ) but the Tabby code expects some JSON response with a valid modified_at field. Since there is no result, the variable this.lastRemoteChange becomes an invalid Date (See line 105 of the same file).

The autoSync feature (L185) uses the lastRemoteChange variable to see if a new config must be downloaded and applied. Since the lastRemoteChanged variable is not a valid date after a config upload, the comparison in L189 will never be 'true' and hence the autoSync feature stops working.

I believe a valid fix would be to return with a PATCH request the same result as would be returned with a http GET request to get the config?

Am I the only one with this problem? Or am I missing something?

Thanks in advance

@Clem-Fern
Copy link
Owner

Hey @bc547

Thank's for the report. I'll try to take a look asap and keep you update.

@Clem-Fern Clem-Fern added the bug Something isn't working label Mar 8, 2024
@Clem-Fern Clem-Fern mentioned this issue Mar 10, 2024
@Clem-Fern
Copy link
Owner

Hey @bc547,

This issue should be fixed in the latest release.
Build in progress :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants