shanalikhan / code-settings-sync

🌴πŸ’ͺ Synchronize your Visual Studio Code Settings Across Multiple Machines using GitHub GIST πŸ’ͺ🌴
https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync
MIT License
4.02k stars 389 forks source link

Settings Sync port conflicts #1053

Open PMExtra opened 5 years ago

PMExtra commented 5 years ago

πŸ› Describe the bug
Settings Sync listen port 54321 to get GitHub authorization callback. But there is a popular Chinese download tool that named Thunder used port 54321 too, and it will startup at login default. There are about more than hundreds million users of Thunder. So I think it would be better if we can choose another port instead 54321.

πŸ“Ί Error phenomenon The browser show ERR_EMPTY_RESPONSE when I clicked LOGIN WITH GITHUB button on Welcome to Settings Sync page.

πŸ“Ί Additional context TIMζˆͺε›Ύ20190928165210

shanalikhan commented 5 years ago

Alright, i think we can make this port as a configuration so anyone can change when required

PMExtra commented 5 years ago

I think we can make it random and pre-check if the random port is already in use.

shanalikhan commented 5 years ago

Yes, that is good too. Will look into it or PR is welcome.

https://github.com/shanalikhan/code-settings-sync/blob/eb332ba5e8180680e613e94be89119119c5638d1/src/service/webview.service.ts#L348

auxves commented 5 years ago

@shanalikhan This won't work since the port must be set in the GitHub OAuth application settings and cannot be dynamic.

shanalikhan commented 5 years ago

Oh! I forgot that. You are right. Do u have any ideas in mind?

That means we really cant change the port in new version, there will be backward compatibility issues - Settings Sync GUI will stop working for all of the previous versions.

Lets see how this thread go, i will keep this opened Get Outlook for iOShttps://aka.ms/o0ukef


From: Arno Hovhannisyan notifications@github.com Sent: Friday, October 4, 2019 6:37:52 AM To: shanalikhan/code-settings-sync code-settings-sync@noreply.github.com Cc: Shan Khan shanalikhan@hotmail.com; Mention mention@noreply.github.com Subject: Re: [shanalikhan/code-settings-sync] Config for Settings Sync port (#1053)

@shanalikhanhttps://github.com/shanalikhan This won't work since the port must be set in the GitHub OAuth application settings and cannot be dynamic.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/shanalikhan/code-settings-sync/issues/1053?email_source=notifications&email_token=ACC6HHFHHZQPTMVPZEABSNDQM2M7BA5CNFSM4I3NLAFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAKC4JI#issuecomment-538193445, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACC6HHCLUSQOPAS7CMPPU3DQM2M7BANCNFSM4I3NLAFA.

auxves commented 5 years ago

Do u have any ideas in mind?

One solution could be to create a new GitHub OAuth application based on the current one, change the port to something very uncommon on both the OAuth app and Settings Sync, and use that application's client ID, secret, and port in the new version. That way, older versions will still work, but new versions will use the new port.

shanalikhan commented 5 years ago

Yes, but in that case people are going to authorizing another Settings Sync application to their GitHub profile...

PMExtra commented 5 years ago

At least, we should provide a message to notify users the port was occupied, and link to a wiki to guide users how to check which program listened the port, or how to configure manually.

shanalikhan commented 4 years ago

we should provide a message to notify users the port was occupied, and link to a wiki to guide users how to check which program listened the port, or how to configure manually.

Public Edit is allowed on Wiki Troubleshooting. Feel free to improve and help community. Thanks

xiangnanscu commented 4 years ago

thanks dude. you save my day

fsqx commented 4 years ago

thank you so much for save me.