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

Unable to do google sign-in on ios device after adding the mobile_scanner in the pubspec.yaml #1246

Open
WaliHassanKhan opened this issue Nov 25, 2024 · 15 comments

Comments

@WaliHassanKhan
Copy link

Screen.Recording.2024-11-24.at.10.08.19.PM.mov

Anyone knows whats going on here?

This is running fine on android. But not on IOS.

@WaliHassanKhan WaliHassanKhan changed the title Unable to do google sign-in on ios device after adding the mobile_scanner Unable to do google sign-in on ios device after adding the mobile_scanner in the pubspec.yaml Nov 25, 2024
@WaliHassanKhan
Copy link
Author

Google sign in is working fine on the android device.

It seems that there might be a a conflicting package.

I would be happy to setup a video call to discuss this

@navaronbracke
Copy link
Collaborator

What version of mobile_scanner and google_sign_in are you using?
Can you provide your flutter doctor -v output?
Do you see any logs in the console?

@WaliHassanKhan
Copy link
Author

` flutter doctor -v
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.5 23F79 darwin-arm64, locale en-US)
• Flutter version 3.24.3 on channel stable at /Users/walihassankhan/Documents/Flutter_SDK/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2663184aa7 (3 months ago), 2024-09-11 16:27:48 -0500
• Engine revision 36335019a8
• Dart version 3.5.3
• DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at /Users/walihassankhan/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16A242d
• CocoaPods version 1.16.2

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.95.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.100.0

[✓] Connected device (6 available)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 15 (API 35) (emulator)
• iPhone (mobile) • 00008120-0001645C1A28C01E • ios • iOS 17.5.1 21F90
• iPhone 16 Pro (mobile) • BDEE2F92-BE40-4128-8DCE-5B14AE59C3FB • ios • com.apple.CoreSimulator.SimRuntime.iOS-18-0 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.5 23F79 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.5 23F79 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.86

[✓] Network resources
• All expected network resources are available.

• No issues found!
`

google_sign_in: ^6.2.2
mobile_scanner: ^6.0.2

No logs show up.

@navaronbracke
Copy link
Collaborator

If you run your app from XCode, do you see anything in the XCode terminal?

@WaliHassanKhan
Copy link
Author

it doesn't produce any error in the xcode terminal when i click on the sign in button.

Btw this issue also exists for the

google_mlkit_barcode_scanning: ^0.13.0 package.

@navaronbracke
Copy link
Collaborator

navaronbracke commented Nov 26, 2024

Since in the video it shows that it opens a webpage, could you perhaps debug the running webview / browser using Safari? From there you can see the browser console from the open webpage. Can you post the logs from that browser console?

For example, using Safari on a running webview like this:

334679443-8a24fcdb-ca0e-4a4e-a37d-2d229cfcb565 334680139-3e5bc8b6-0825-453e-9829-798737ad5b17

This reproduces with the google_sign_in example app? (when adding mobile_scanner to it's pubspec)
If that is the case then I could try debugging this, using that as code sample

@WaliHassanKhan
Copy link
Author

not getting anything on the web inspector either

iphone.debug.mov

@karseng9898
Copy link

I think the iOS 18 simulator is having issues with pods that exclude the arm64 architecture. You can try using a simulator running iOS 17 or earlier.

@navaronbracke
Copy link
Collaborator

If this is related to arm64, can you verify if this works with https://pub.dev/packages/mobile_scanner/versions/7.0.0-beta.3 ?

Version 7 restores compatibility with arm64 simulators.

@karseng9898
Copy link

Yes, it works fine with the version 7 on iOS 18 simulator

@navaronbracke
Copy link
Collaborator

@ck-lamib
Copy link

it is working fine on mobile_scanner: ^7.0.0-beta.4
but still the error persist on mobile_scanner: ^6.0.3
@navaronbracke

@navaronbracke
Copy link
Collaborator

Hmm, then I wouldn't know what is causing this out of the top of my head.
Since the latest beta fixes it, I guess you should switch to that version?

@hls-app
Copy link

hls-app commented Feb 6, 2025

@navaronbracke this is because of the arm64 support

See related issues
firebase/flutterfire#13420
flutter/flutter#155401

See the comment: flutter/flutter#79641 (comment)

@navaronbracke
Copy link
Collaborator

@hls-app Thanks for that info!

@WaliHassanKhan Version 6.0.2 dropped arm64 support for the Simulator, since MLKit 7.0.0 didn't support it.
We restored arm64 support for the Simulator in version 7.0.0-beta.1, where we switch from MLKit to the Vision API.

You probably want to use version 7.0.0-beta.6 then, or stick with 6.0.2 for now, but then you won't be able to use the iOS Simulator.

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

No branches or pull requests

5 participants