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

🐛[auth] : Windows desktop crashes when google signin is attempted. #11752

Closed
floyd-lewis opened this issue Oct 21, 2023 · 11 comments · Fixed by #11861
Closed

🐛[auth] : Windows desktop crashes when google signin is attempted. #11752

floyd-lewis opened this issue Oct 21, 2023 · 11 comments · Fixed by #11861
Assignees
Labels
platform: windows Issues / PRs which are specifically for Windows. plugin: core resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working type: crash A compile error or crash

Comments

@floyd-lewis
Copy link

floyd-lewis commented Oct 21, 2023

Bug report

Was using firedart before. Since the new release now supports Windows desktop I had installed the below plugins. App compiles and runs but crashes the moment I click the google signin button.
Nothing is logged to the console.

Describe the bug
A clear and concise description of what the bug is.
Use the following packages:
###################################################
firebase_core: ^2.19.0
cloud_firestore: ^4.11.0
firebase_auth: ^4.11.1
firebase_storage: ^11.3.1
#####################################################
google_sign_in: ^6.1.5
google_sign_in_platform_interface: ^2.4.2
extension_google_sign_in_as_googleapis_auth: ^2.0.11
google_sign_in_dartio:
path: packages/google_sign_in_dartio

@floyd-lewis floyd-lewis added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Oct 21, 2023
@darshankawar darshankawar added the triage Issue is currently being triaged. label Oct 23, 2023
@darshankawar
Copy link

darshankawar commented Oct 23, 2023

Thanks for the report @floyd-lewis
google_sign_in doesn't seem to support windows yet. flutter/flutter#103682
I currently don't have windows machine to verify, but can you run flutter run -v and check if it shows any error entries in it ? If so, can you provide the entire log here ?

@darshankawar darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Oct 23, 2023
@TheAkash2002
Copy link

TheAkash2002 commented Oct 25, 2023

I have the same issue, however my library versions are newer. There are no error entries in flutter run -v.

firebase_core: ^2.20.0
firebase_auth: ^4.12.0
cloud_firestore: ^4.12.0
cupertino_icons: ^1.0.2
get: ^4.6.5
permission_handler: ^11.0.1
google_fonts:
get_storage: ^2.1.1
logging: ^1.2.0
fluttertoast: ^8.2.2
loading_animation_widget: ^1.2.0+4
just_audio: ^0.9.35
bot_toast: ^4.1.3
google_sign_in: ^6.1.5
google_sign_in_dartio:

I took a closer look using debugger and found that signInWithCredential() of messages.pigeon.dartis the culprit. App crashes immediately after the channel.send() call.

Edit: The issue seems to be with firebase_auth and not firebase_core.

@floyd-lewis
Copy link
Author

Its a simple fix. Just open the VC++ project after doing a windows build. firebase_auth is asserting for secret parameter which were not required. I moved it to within the methods requiring it.

std::string secret = std::getstd::string(arguments[kArgumentSecret]);

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Oct 25, 2023
@darshankawar
Copy link

Thanks for the update. Since I don't have windows to verify it, based on the report and potential fix as above, keeping it open and labeling for team's tracking.

@darshankawar darshankawar added plugin: core type: crash A compile error or crash platform: windows Issues / PRs which are specifically for Windows. and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Oct 25, 2023
@TheAkash2002
Copy link

TheAkash2002 commented Oct 25, 2023

Its a simple fix. Just open the VC++ project after doing a windows build. firebase_auth is asserting for secret parameter which were not required. I moved it to within the methods requiring it.

std::string secret = std::getstd::string(arguments[kArgumentSecret]);

This works! secret and rawNonce were the unnecessary variables in my case (GoogleSignIn using google_sign_in_dartio).

@floyd-lewis
Copy link
Author

floyd-lewis commented Oct 26, 2023 via email

@black-coda
Copy link

@floyd-lewis
Hi, Please i still havent been able to run firebase with my windows app.
it keeps on showing build error
How did you do yours?

Thanks

@laurencetroyv
Copy link

same problem with @black-coda, it only shows

Launching lib\main.dart on Windows in debug mode...
Exception: Build process failed.

Exited (1).

@black-coda
Copy link

@darshankawar Please any updates

@darshankawar
Copy link

/cc @Lyokone

@Lyokone Lyokone changed the title 🐛firebase_core : Windows desktop crashes when google signin is attempted. 🐛auth : Windows desktop crashes when google signin is attempted. Nov 10, 2023
@Lyokone Lyokone changed the title 🐛auth : Windows desktop crashes when google signin is attempted. 🐛[auth] : Windows desktop crashes when google signin is attempted. Nov 10, 2023
@Lyokone Lyokone self-assigned this Nov 10, 2023
@Lyokone
Copy link
Contributor

Lyokone commented Nov 10, 2023

Thanks for opening the issue, I wasn't aware of google_sign_in_dartio, I've created #11861 which should show how to use this package.

@darshankawar darshankawar added the resolution: fixed A fix has been merged or is pending merge from a PR. label Nov 27, 2023
@firebase firebase locked and limited conversation to collaborators Dec 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform: windows Issues / PRs which are specifically for Windows. plugin: core resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working type: crash A compile error or crash
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants