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

[Bug]: OneSignal Initialization Fails with Null AppId - "FATAL: OneSignal AppId: (null)" #852

Closed
2 of 3 tasks
burhanaksendir opened this issue Mar 3, 2024 · 1 comment

Comments

@burhanaksendir
Copy link

burhanaksendir commented Mar 3, 2024

What happened?

OneSignal initialization fails with the following error message: "FATAL: OneSignal AppId: (null) - AppId is null or format is invalid, stopping initialization."

Steps to reproduce?

1. Initialize OneSignal in the Flutter application with a valid AppId.
2. Ensure that the AppId is correct and in the proper format.
3. Run the application for the first time.
4. Observe the error in the log output.

What did you expect to happen?

I expected OneSignal to initialize successfully without any errors when providing a valid AppId.

OneSignal Flutter SDK version

5.1.0

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

FATAL: OneSignal AppId: (null) - AppId is null or format is invalid, stopping initialization.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@nan-li
Copy link
Contributor

nan-li commented Mar 20, 2024

Hi @burhanaksendir, thanks for reporting. This is a misleading log on a new app install. Initialization did not fail.

This is logged by the native iOS SDK that the Flutter SDK calls into and the app ID has not been set YET by the developer. The Flutter SDK needs initialize the native iOS SDK in order to pass along iOS launch options very early in the app startup process.

If you turn on verbose-level logging, you should see VERBOSE: setAppId called with appId: <YOUR_APP_ID> being logged shortly after the Fatal log you reported. Sorry for any confusion this log caused.

@nan-li nan-li closed this as completed Apr 2, 2024
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

2 participants