code-settings-sync icon indicating copy to clipboard operation
code-settings-sync copied to clipboard

Settings Sync port conflicts

Open PMExtra opened this issue 7 years ago β€’ 11 comments

πŸ› 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

PMExtra avatar Sep 28 '19 08:09 PMExtra

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

shanalikhan avatar Sep 30 '19 05:09 shanalikhan

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

PMExtra avatar Oct 01 '19 11:10 PMExtra

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

shanalikhan avatar Oct 01 '19 11:10 shanalikhan

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

auxves avatar Oct 04 '19 01:10 auxves

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 [email protected] Sent: Friday, October 4, 2019 6:37:52 AM To: shanalikhan/code-settings-sync [email protected] Cc: Shan Khan [email protected]; Mention [email protected] 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.

shanalikhan avatar Oct 04 '19 04:10 shanalikhan

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.

auxves avatar Oct 04 '19 05:10 auxves

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

shanalikhan avatar Oct 04 '19 05:10 shanalikhan

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.

PMExtra avatar Oct 04 '19 05:10 PMExtra

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

shanalikhan avatar Nov 12 '19 13:11 shanalikhan

thanks dude. you save my day

xiangnanscu avatar Jul 03 '20 13:07 xiangnanscu

thank you so much for save me.

fsqx avatar Aug 09 '20 17:08 fsqx