-
Notifications
You must be signed in to change notification settings - Fork 584
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
FirebaseApp is not initialized in this process #4693
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Hi @hram, thanks for reaching out to us. I'm not experiencing the same behavior with the steps you've provided. I added @AddTrace to my application class, but there seems to be no issue. Relevant code:
Dependencies:
Manifest:
Am I missing anything? |
Hey @hram. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
@argzdev I believe the app has to startup a separate process where <service
android:name="com.company.NewProcess"
android:process=":NewProcess" /> Starting this service would result in a crash. |
Hi @tevjef, thanks for the insight. I'm not sure if I'm doing something wrong, but I still can't replicate the same behavior even with the service. AndroidManifest:
Random Service code:
MainActivity:
|
@argzdev why do you call FirebaseApp.initializeApp(this) before super.onCreate()? |
Hi @hram, I tried it with both scenario (before or after |
Hey @hram. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
@argzdev https://github.com/tevjef/android-bugs/tree/firebase-android-sdk-issues-4693 When launching the app: Observe firebase is initialized properly.
|
Thanks @tevjef, I was able to reproduce the same behavior now. I'll notify our engineers. |
Hi @argzdev Any update on this ? ... |
Hi all, sorry for the radio silence. Our engineers are currently working on other issues at the moment. However, rest assured that this will be worked on as soon as possible. That said, I'd like to ask for help to kindly give an emoji thumbs up on the original author's post for tracking. This'll help us prioritize issues based on severity and demand. Thanks! |
Any work around for this issue? While we wait for the next update that hopefully fixes it |
I even tried to downgrade to 4.3.15 and it still happening :-( |
Downgrade to 4.3.15 helps to me |
@engineerStuardo Thank you. Its really helped. version : 4.3.4 |
thanks!!!!!!!!!! |
classpath 'com.google.gms:google-services:4.3.8' is OK but classpath 'com.google.gms:google-services:4.4.1' crash |
thank you bro! |
Hi @visumickey and @argzdev do we have any update on the fix. |
The original problem was related to the :Metrica process (it is an analytics service of Yandex, the largest advertising provider in the CIS). In new versions of the library, the process has been renamed to :AppMetrica
ProcessUtil.java: This method works with the newest versions of libraries, there is no need to downgrade dependency versions. |
Yes, i just updated com.google.gms:google-services from 4.3.15 to 4.4.1 and it's started crashing for me for above issue. Added initialization in Activity as well as in APplication file, still crashes for me. |
I have tested the following versions of Firebase (Flutter) versions: firebase_core: ^2.27.1
firebase_auth: ^4.17.9
firebase_messaging: ^14.7.20 |
Hi, any progress on this issue? com.google.gms:google-services 4.4.1: not working |
I had this same issue due to an Activity being designated to a separate process. Downgrading versions did not work for me. However, manually initializing Firebase as outlined in #4599 resolved the issue.
Unfortunately manually initializing Firebase apparently breaks |
集成了下面的sdk 功能, firebase-crashlytics 统计到线上用户报错 Caused by java.lang.IllegalStateException classpath 'com.google.gms:google-services:4.3.15' implementation 'com.google.firebase:firebase-crashlytics:18.6.4' |
Same here, upgrading to "com.google.gms:google-services:4.4.2" breaks my app. I will stay with "com.google.gms:google-services:4.3.10" until it gets resolved |
Any update on this @argzdev ? 😅😅 |
Same for me it seems that it could be due to some refactoring: google/play-services-plugins#269
This did trigger the error |
4.3.15는 괜찮은것 같습니다. |
Any progress on this issue? Even I am facing it after upgrading Firebase BoM to 33.2.0 |
Here's what the Javadoc from the FIrebaseApp.java class says :- "Any FirebaseApp initialization must occur only in the main process of the app. Use of Firebase in processes other than the main process is not supported and will likely cause problems related to resource contention." So, going by the maintainers' recommendation, we're not supposed to initialize Firebase in non-main processes. I did initalize Firebase in a non-main process in the Application onCreate() and it did stop the crash, but I'm not sticking to this solution because it may have side effects that may only be realized in production. |
If an exception is going to be thrown then we should be allowed to catch it. At the very least this should be failing gracefully. Analytics should not be crashing apps in production. |
Hi @visumickey and @argzdev do we have any update on the fix. |
Knock-knock-knock, is there any update? |
@ernazarsembayev we landed a fix for this, it will go out in the next-next release due to timing. |
This fix was released in Perf version 21.0.2 |
[READ] Step 1: Are you in the right place?
Issues filed here should be about bugs in the code in this repository.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:
with the firebase tag.
google group.
of the above categories, reach out to the personalized
Firebase support channel.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
Relevant Code:
The text was updated successfully, but these errors were encountered: