[go: nahoru, domu]

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

No crashlytics reporting if using same bundle id across different projects #851

Open
shekit opened this issue Nov 2, 2020 · 4 comments
Open

Comments

@shekit
Copy link
shekit commented Nov 2, 2020

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2020.1.8f1
  • Firebase Unity SDK version: 6.16.1
  • Source you installed the SDK: UPM (.unitypackage or Unity Package Manager)
  • Problematic Firebase Component: Crashlytics (Auth, Database, etc.)
  • Other Firebase Components in use: NA (Auth, Database, etc.)
  • Additional SDKs you are using: NA (Facebook, AdMob, etc.)
  • Platform you are using the Unity editor on: Mac (Mac, Windows, or Linux)
  • Platform you are targeting: iOS/Android (iOS, Android, and/or desktop)
  • Scripting Runtime: IL2CPP (Mono, and/or IL2CPP)

[REQUIRED] Please describe the issue here:

(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
If you have two firebase projects that use the same bundle id, then you don't receive any crash reports from Crashlytics.

Steps to reproduce:

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? Yes
What's the issue repro rate? (eg 100%, 1/5 etc) 100%

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.

We have two firebase projects - dev and prod. They share the same bundle id. I enabled crashlytics on both projects and then integrated it in the dev unity app following all the steps indicated in the docs. Even after triggering a crash repeatedly I received no crash reports in the firebase console.

I then downloaded the quickstart app and pointed it to the same dev firebase project. Again no reports came in.

I then created a fresh firebase project with a unique bundle id. I pointed this quickstart app to this new project. Reports started coming in.

I then created another fresh firebase project. This time I set its bundle id to be the same as the dev bundle id (from my original project). I pointed the quickstart app to this new project. No reports came in.

If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.

Relevant Code:

// TODO(you): code here to reproduce the problem
@shekit shekit added the new New issue. label Nov 2, 2020
@patm1987
Copy link
patm1987 commented Nov 3, 2020

I was able to reproduce this issue, so I'll leave it open as a bug. But I think I have a workaround and an explanation:

You need a number of elements to associate a game or application with the Firebase backend. In addition to the google-services.json file, you have a package id and an optional sha-1 which must be a unique combination. When I have two projects with the same package id and the same sha-1, it's expected that Firebase won't work. It looks like if you have two matching package id's and no sha-1, the same restriction applies at least for crashlytics reporting.

I was able to work around this issue by, in my second project, adding a sha-1 key.

I know that it looks like I just moved the goalposts on your issue, but this does mean that if you use different signing certificates for dev and prod you should be able to just upload the sha-1 of your production signing certificate to your production Firebase backend to get it all to work. You should be then be good leaving the SHA-1 empty on your dev backend for dev work (or using a different signing cert if you need features like Authentication).

Let me know if this helps and works for you!

@patm1987 patm1987 added needs-triage and removed new New issue. labels Nov 3, 2020
@suats
Copy link
suats commented Nov 9, 2020

@patm1987 i have the same issue, my prod firebase application has sha-1 keys already, dev firebase has no keys, but both of them not working now. They have same bundle id so, how will it work, any idea?
@shekit could you solve that?

@chkuang-g
Copy link
Contributor

@mrwillis21 @mrichards
This seems to be either backend issue or Android/iOS SDK level issue. Is this an unsupported case? Or is there any in development to alleviate this?

@rotter
Copy link
rotter commented Dec 28, 2020

Any updated info on this? I spent hours trying to get Crashlytics to work without success (my project already has Firebase Analytics working for years). I have 2 projects under the same bundle ID so maybe Im affected by this problem.

EDIT: nevermind, I mixed up the names, I dont have 2 projects with the same bundle ID. And I do have already the SHA keys on the project, so my problem is probably something else

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

No branches or pull requests

8 participants