fastlane: [!] Google Api Error: Invalid request - Package not found: com.example.todo
Asked Answered
C

3

16

I am using React-native for my app. I have named my name reactamplify. I want to deploy my app to Google play-store. For automation deployment I am using first time fastlane. I found this documentation, follow the steps and give API grant access. In my React native app, I navigate to android folder then run this command fastlane init. Give json_key_file path my downloaded auth json file. But I got confused about package name. I search my app name in vscode com.reactamplify replace them into com.example.todo. Then run android folder fastlane supply init, I am getting this error: [!] Google Api Error: Invalid request - Package not found: com.example.todo. I really don't know how to fix it :(. Really lost TBH.

When I run fastlane supply. I got this image

enter image description here

PS: It would be awesome if someone gives me example with images

Cobby answered 6/9, 2021 at 10:57 Comment(0)
C
46

I found the reason. I need to upload at least one build to google Play store app manually. That’s why I got package name error.

Cobby answered 7/9, 2021 at 3:44 Comment(10)
I am getting the same exact error message when doing expo upload:android. What do you mean by "upload at least one build"? That's exactly what I am trying to do.Moffit
Do you have expo account? If yes, then run this command expo build:android . It will build apk in your expo account. Then you will download apk file to your laptop/desktop. Then go to play.google.com/console/developers website and upload your apk in production res.cloudinary.com/drewzxzgc/image/upload/v1635404261/…Cobby
Many thanks. I did expo build:android, then I run expo upload:android, I choose to use the latest build in the cloud (so no need to download aap), I have JSON keys downloaded and then I run expo upload:android and it fails. There are commands expo publish:..., which I never run because I don't understand what it is for. So you mean I have to do one upload manually, after that I will be able to that from command line?Moffit
Yes. You have to upload manually. I follow this setup: docs.fastlane.tools/getting-started/android/setup and tutorial: dev.to/jeiman/…. I understand it's confusing at the beginning.Cobby
This is also another important steps you have to do it. reactnative.dev/docs/signed-apk-android otherwise you cannot manually upload your apk build in play-store. it will shows error in play-storeCobby
Reads these three links carefully and make sure you read every line 😁. Sometimes I am so impatient to read all and try to make things faster, And that cause me times.Cobby
I see you edited your answer. "Manually" is the key word, now it makes sense. Expo is switching from expo build to eas tool. I have the patience to read all, but they are not explaining how to use old tools, and I don't want to use eas, which is in preview stage and paid if you want to submit to store. I think I should learn fastlane instead of expo tools.Moffit
eas tool? What is eas tool.Cobby
github.com/expo/eas-cliMoffit
Yeah this happens with eas too, it's actually documented: docs.expo.dev/submit/android/…Combination
E
1

In my case, I deleted the fastlane folder and then ran the following again:

fastlane supply init
Eyehole answered 21/11, 2021 at 19:39 Comment(0)
M
-1

For me i found that google play ignore the "com." in the package name! So when submitting a new release make sure to remove "com." from your package string.

Microdont answered 20/3, 2022 at 2:27 Comment(2)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Heifetz
Doing this I get a different error: Google Api Error: Invalid request - Package not found:Affirm

© 2022 - 2024 — McMap. All rights reserved.