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

Add network.server to macos release entitlements #18

Merged
merged 1 commit into from
Feb 2, 2022

Conversation

karniv00l
Copy link
Contributor

@karniv00l karniv00l commented Feb 2, 2022

Fixes #17

Missing server permissions in release mode:

flutter: [Launching]: https://accounts.spotify.com/authorize?response_type=code&client_id=&redirect_uri=http%3A%2F%2Flocalhost%3A4304%2Fauth%2Fspotify%2Fcallback&code_challenge=&code_challenge_method=S256&scope=user-library-read+user-library-modify+user-read-private+user-read-email+user-follow-read+user-follow-modify+playlist-read-collaborative
flutter: [connectIpc]: SocketException: Failed to create server socket (OS Error: Operation not permitted, errno = 1), address = 127.0.0.1, port = 4304
flutter: #0      _NativeSocket.bind (dart:io-patch/socket_patch.dart:988)
<asynchronous suspension>
#1      connectIpc (package:spotube/helpers/server_ipc.dart:11)
<asynchronous suspension>
#2      oauthLogin (package:spotube/helpers/oauth-login.dart:24)
<asynchronous suspension>

flutter: [oauthLogin()] SocketException: Failed to create server socket (OS Error: Operation not permitted, errno = 1), address = 127.0.0.1, port = 4304
flutter: #0      _NativeSocket.bind (dart:io-patch/socket_patch.dart:988)
<asynchronous suspension>
#1      connectIpc (package:spotube/helpers/server_ipc.dart:11)
<asynchronous suspension>
#2      oauthLogin (package:spotube/helpers/oauth-login.dart:24)
<asynchronous suspension>

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: SocketException: Failed to create server socket (OS Error: Operation not permitted, errno = 1), address = 127.0.0.1, port = 4304
#0      _NativeSocket.bind (dart:io-patch/socket_patch.dart:988)
<asynchronous suspension>
#1      connectIpc (package:spotube/helpers/server_ipc.dart:11)
<asynchronous suspension>
#2      oauthLogin (package:spotube/helpers/oauth-login.dart:24)
<asynchronous suspension>

@KRTirtho
Copy link
Owner

KRTirtho commented Feb 2, 2022

Does this make the OAuth login process work? I mean the IPC login part?

@karniv00l
Copy link
Contributor Author

Does this make the OAuth login process work? I mean the IPC login part?

Yes

@karniv00l
Copy link
Contributor Author

karniv00l commented Feb 2, 2022

Sorry that I didn't report that earlier. It works in debug mode because there are permissions in place for that mode by default (https://github.com/KRTirtho/spotube/blob/master/macos/Runner/DebugProfile.entitlements). There is also a problem with the playback but I'll report that in a separate issue and try to debug it in spare time.

@KRTirtho KRTirtho self-assigned this Feb 2, 2022
@KRTirtho
Copy link
Owner

KRTirtho commented Feb 2, 2022

Thanks for the contribution❤️

@KRTirtho KRTirtho merged commit 6ceeac4 into KRTirtho:master Feb 2, 2022
@karniv00l karniv00l deleted the fix-macos-server branch February 2, 2022 15:34
@nank1ro
Copy link

nank1ro commented Feb 7, 2022

Hi!
I've downloaded the .dmg from the last release but I noticed this bug.
Now I'm building from source to see if it works.
Can you update the release, or make a new one to include this fix please?

@benyaminbeyzaie
Copy link

I can't run the app from releases please update release. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't Login in MacOS
4 participants