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

App Name coming up as Notifee Core #334

Closed
johnf opened this issue Mar 7, 2022 · 6 comments
Closed

App Name coming up as Notifee Core #334

johnf opened this issue Mar 7, 2022 · 6 comments

Comments

@johnf
Copy link

johnf commented Mar 7, 2022

When things like permissions dialog ask for permissions or 1Password wants to save a password my app's name comes up as "Notifee Core" in those applications. Happens in prod build doesn't seem to happen in the local build.

Maybe android is preferring the notifee AAR and is pulling the name from there first?

@mikehardy
Copy link
Contributor

What in the !? 😆 🤔
To be clear, this is android, and this is using current version (v5)? Totally unexpected.
Do you use react-native-permissions for permission handling? Does it happen with those permission prompts?
Curious how to pop a permission dialog that will reproduce this, but that will be key (https://stackoverflow.com/help/minimal-reproducible-example / https://github.com/mikehardy/rnfbdemo/blob/main/notifee-demo.sh)

@johnf
Copy link
Author

johnf commented Mar 7, 2022

Yeah I know that was my reaction!

Andorid but 4.1.0, I forgot v5 came out, I delayed due to not having time to deal with the breaking changes.

I'm using @react-native-firebase/messaging to request the permission. But I don't think it is related because I noticed 1Password does the same thing when it asks to save the password.

I'll update my CI to store my APK before uploading to Google to see if I can replicate and see if it's different in release vs debug builds.

I can spend some time moving to 5 if you think that might be related.

@mikehardy
Copy link
Contributor

I don't think v5 will matter much vs v4.1.0, I was more concerned if you were still back on the closed source versions for whatever reason. I build/test react-native-firebase pretty frequently and our tests_react_native example app here in repo actually uses it, this shouldn't be too difficult to replicate.

@johnf
Copy link
Author

johnf commented Mar 8, 2022

@mikehardy I'm working on a reproducible example I can share now.

FYI the notifee-demo script is broken, it hasn't been updated with the 0.68.0-rc.2 changes you made. Breaks when applying the patches

@johnf
Copy link
Author

johnf commented Mar 8, 2022

OK worked it out. my fault.

I had removed android/app/src/main/res/values/strings.xml and then in build.gradle I do

        stage {
            initWith release
            applicationIdSuffix ".stage"
            versionNameSuffix "-stage"
            resValue "string", "app_name", "App-stage"
            matchingFallbacks = ['release']

I do this so I can build different versions for stage, dev, environments with different names.

I had forgotten to set resValue for the prod variant!

Sorry for wasting time with this. Interesting that it ends up defaulting to Notifee Core though!

@johnf johnf closed this as completed Mar 8, 2022
mikehardy added a commit to mikehardy/rnfbdemo that referenced this issue Mar 8, 2022
@johnf noticed it wasn't working while trying to reproduce invertase/notifee#334
Thanks John!
@mikehardy
Copy link
Contributor

FYI the notifee-demo script is broken, it hasn't been updated with the 0.68.0-rc.2 changes you made. Breaks when applying the patches

Oh no! I just pushed mikehardy/rnfbdemo@31ad7c9 over there which should fix that. Sorry that wasn't working out of the box but thanks for letting me know so I could patch it up!

Having that AAR name bubble up as the app name as a fallback is just bizarre and I didn't turn up anything on web searches related to it. Going to chalk that behavior decision up to "mysteries of the universe" given the naming issue you discovered in-project is something that must be corrected for other reasons (like, branding...) every time anyway. Glad you found it :-)

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