expo entity not found - android

I have already make a build for android last week and everything works well. I have make some changes and now I want to make another build with expo build:android and I get this error.
Checking if this build already exists…
Entity Not Found.
It works well in ios but I couldn’t make the build for android. any thoughts?
thanks!

I fixed this error by changing the "slug" value to something else in the app.json file

I recently encountered this issue, tried a bunch of things. not sure which resolved it but here is a list.
How it started - a guess of how the issue originated
In app.json file I changed the value of android.package from "io.expo.client" to "com.mydomain.myapp"
"android": {
"package": "com.expo.client", // ---> "com.mydomain.myapp"
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},
Then after that and a few other changes expo build:android resulted in an error Entity Not Found.
The fix - try the following to hopefully resolve your issue
delete all builds of the app from the project in expo
delete the project
create a new project
make sure the slug names match with that in your app.json file
run expo build:android -c on your app terminal to build with new credentials
accept to delete the old credentials
accept to have Keystore generated for you by expo

Deleting all builds of the app from the project in Expo alone helped me.
Don't forget to refresh the page between builds removal as changes do not immediatlety reflected

try to build with --clear-credentials flag...
or try in another expo account.

Related

Expo build apk : ExponentToken not generated

I created my first expo app, who can send notification to multiple users. I use the expo-notification package to generate the ExponentToken and handle incoming notification.
Everythings works perfecly when I use the expo go app, but recently I build my app in apk with eas
$ eas build -p android --profile genAPK
//the genAPK profile :
build: {
"genAPK":{
"android": {
"buildType":"apk"
}
}
}
I downloaded the builded apk, but when my real app want to generate the ExponentToken it just not works and return me a empty string... (I know it because my app crash do a alert() if the token is empty)
I don't know if this help, but I dont use the firebase way, I use the expo node sdk and my own database and API to store tokens and send notifications
Is this a common mistake and how can I fix this ?
Or at least can I see the output of my package even if this is a apk ?
Thanks in advance
My notification is also not working when i upgrade to EAS.
And i found this in Expo discord group:
No experienceId or projectId found. If one or the other can't be inferred from the manifest (eg. in bare workflow), you have to pass one in yourself.
at http://192.168.7.186:8081/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&minify=false:102608:321 in _createSuperInternal
at node_modules/expo-modules-core/build/errors/CodedError.js:10:8 in constructor
at http://192.168.7.186:8081/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&hot=false&minify=false:313197:49 in getExpoPushTokenAsync$
There is a problem with ExpoPushToken, and you can see the source of this error from here expo-notifications-repo. The cause of this error in my case is the projectId, because in the expo-notifications-repo they use expo-constant package which have change in the latest SDK. So i need to add projectId to my app.json
"extra":{
"eas":{
"projectId":"(PROJECT_ID-Expo.dev)"
}
}

Use Firebase In-App-Messaging in Expo Project

I'm trying to add in a built-in application with react-native-expo a series of tools from firebase.I managed to add the following features Cloud Messaging and Firebase Analitycs.But I have to integrate In-app-messaging and Dynamic links
First time I install all firebase module/dependencies to do this task.
"#react-native-firebase/app": "^12.9.3",
"#react-native-firebase/in-app-messaging": "^12.9.3",
and my file looks like:
.......
import inAppMessaging from '#react-native-firebase/in-app-messaging
.......
useEffect(()=>{
await inAppMessaging().setMessagesDisplaySuppressed(true);
}[])
but I recive a warning:
]Unhandled promise rejection: Error: You attempted to use a firebase module that's not installed on your Android project by calling firebase.app().
After that I try to find a solution,I learn that expo allow to create plugins to extend expo functionality
I tty to salve problem fallow expo documentation but I couldn't figure out how to create these plugins.
Next I find a module that can help me with-rn-firebase but is not working and the module is depeciated.
Then I searched the internet until I discovered other people with the same problem this is the link I see in their app.json a basic config of plugin and I try to implement in my project,after I install dependencies that I need i add in my file:
"plugins": [
"#react-native-firebase/app",
"#react-native-firebase/analytics",
"#react-native-firebase/in-app-messaging"
],
But the fallowing error occure:
Package "#react-native-firebase/analytics" does not contain a valid config plugin.
Learn more: https://docs.expo.io/guides/config-plugins/#creating-a-plugin
Cannot use import statement outside a module
What I mean is, if anyone has ever faced this problem, I want in my project to be able to use in-app-messaging and dynamyc-links if someone has tried an implementation with expo and has any idea
Eventually I solved the problem,expo when I use the command expo:build android it only compiles my javascript files,but some of the code was written in java and other optional files in the android / ios folder.So instead of compiling with expo I used eas.
Faloowing command:
Run as administrator cmd and write this line npm install -g eas-cli.
Initialize new module in your expo/react native project with this line eas init.
Build aplication using this line for android: eas build --platform android
*For ios is a bit different you mast edit your file eas.json:
{
"cli": {
"version": ">= 0.43.0"
},
"build": {
"development": {
"distribution": "internal",
"android": {
"gradleCommand": ":app:assembleDebug"
},
"ios": {
"buildConfiguration": "Debug"
}
},
"preview": {
"distribution": "internal"
},
"production": {
"ios": {
"cocoapods": "1.11.2"
}
}
},
"submit": {
"production": {}
}
}
Build aplication using this line for ios: eas build --platform ios
Eas build include in complile all app file .gradle/.js/.java/.xml/.m/.h and this thing offer your posibility to build mobile app in expo with same functionality and complexity like react native cli.
Usefull Link
https://docs.expo.dev/build/setup/
React Native Expo Build Failing due to cocoapods version
I think you need to run locally using expo dev client
https://docs.expo.dev/development/getting-started/
Mostly, the package that is not supported by expo can run natively. But you need successfully built in eas build.

"Missing app.json" when start an expo project, while the app.json already exists

I try run a blank project from hours, and I do not understand what is wrong.
I have the file app.json in my project folder :
{
"sdkVersion" : "19.0.0"
}
and when I try :
expo start
I have this message :
PS D:\Projects\VSCode\AwesomeProject> expo start
Starting project at D:\Projects\VSCode\AwesomeProject
Expo DevTools is running at http://localhost:19002
Error: Missing app.json. See https://docs.expo.io/
No Expo configuration found. Are you sure this is a project directory?
PS D:\Projects\VSCode\AwesomeProject>
If I try
expo android
I get this :
PS D:\Projects\VSCode\AwesomeProject> expo android
Error: Missing app.json. See https://docs.expo.io/
There is an error with your project. See above logs for information.
Set EXPO_DEBUG=true in your env to view the stack trace.
- Making sure project is set up correctly...
PS D:\Projects\VSCode\AwesomeProject>
This is a blank project, i do not understand what is going wrong. How can I found sdkversion in use ? I thought It was the error, but I am not sure.
Thank you for your help
looks like that was generated with react-native init and not expo, because it doesn't have an "expo" section. we should provide a better error message in this case.
{
"expo": {
"sdkVersion": "32.0.0"
...
}
}
It's part of the project I just made.
I solved this problem by adding sdkVersion, as you can see in the image

include.gradle file being generated is causing problems

When building a project I get the following error:
Flavor 'nativescript-telerik-ui' has unknown dimension 'nativescript-telerik-ui'.
It happens only when using the pro version through the #progress registry. Doesn't happen with the local .tgz pro version.
I noticed the error has to do with the include.gradle file it generates. I read the following article: https://docs.nativescript.org/plugins/plugins#includegradle-specification
It says that when the plugin doesn't have the include.gradle, at build time gradle creates a default one with default elements. When I saw the include.gradle it generated for the plugin it seems to have generated a default one like so:
android {
productFlavors {
"nativescript-telerik-ui" {
dimension "nativescript-telerik-ui"
}
}
}
The include.gradle generated for the local .tgz version of the plugin is like this:
android {
productFlavors {
"F6" {
dimension "nativescripttelerikuipro"
}
}
}
I replaced the default include.gradle with the latter and it got past the error. You can recreate the problem by following these steps:
create a new hello world app
use the command npm login --registry=https://registry.npm.telerik.com/ --scope=#progress to log in if you're a paying customer.
use the command npm install --save #progress/nativescript-telerik-ui-pro to install the plugin
use tns run android
Is there anything I can do to solve this problem? Really need help on this.
My name is Vladimir and I am part of the nativescript-telerik-ui-pro team. Thank you for logging this issue in our feedback portal. We are going to review it as soon as possible and update you regarding its status, but from what I currently see there is some incorrect "parameters" passed to the 'pro' version of the plugin that are going to be resolved very fast.
We apologize for any inconvenience that this is causing.

Cordova 6.4.0 Android error when building release apk

I had a project working well on cordova 6.3.1 .
Then I updated cordova and my project to 6.4.0 . After this, first time I built, gradle got automatically updated too.
Now I am experiencing an important issue:
I need to include the keystore and alias passwords in the build.json file or the release apk generation fails with error.
I use a build.json file like this:
{
"android": {
"debug": {
"keystore": "C:\\Path\\To\\Keystores\\debug.keystore",
"storePassword": "debugpass",
"alias": "thedebugalias",
"password" : "debugpass",
"keystoreType": ""
},
"release": {
"keystore": "C:\\Path\\To\\Keystores\\theapp.keystore",
"storePassword": "",
"alias": "thealias",
"password" : "",
"keystoreType": ""
}
}
}
And then run this command to generate the release apk:
cordova build android --release --buildConfig=build.json
Until now, this worked well and it prompted me to enter both keystore and alias passwords. And then built the apk ok.
After upgrading to Cordova 6.4.0, it doesn't work anymore. It never prompts for the passwords, and then the building process fails because "the keystore has been tampered with or the password is incorrect".
If I include the passwords in the build.json file, the release apk gets generated ok, since it already has the passwords there and doesn't need to prompt for them.
I don't like having the keystore passwords in plain text in the build.json file. Has anyone experienced this same issue? Any ideas on how to fix this?
Thanks.
EDIT: I noticed another problem. It is not showing my icons and splash screens.
EDIT: This last problem, about not showing icons and splash screens, is a bug in the new Cordova version and it is being resolved https://issues.apache.org/jira/browse/CB-12077
This issue has been solved: https://issues.apache.org/jira/browse/CB-12159
As of now you can use cordova platform add android#6.2.0-nightly.2016.12.9.6c60dc5d
or cordova platform add https://github.com/apache/cordova-android
Keep in mind that the second command adds the latest version and it may introduce other bugs....
In the future you may use cordova platform add android#6.2.0 but as of now 6.2.0 does not exist. (Check here: https://github.com/apache/cordova-android/releases)
Can you put your password into your build.json and see if works.
{
"android": {
"release": {
"keystore": "path\\to\\keystore.keystore",
"storePassword": "password",
"alias": "alias",
"password" : "password",
"keystoreType": ""
}
}
}
I am on the same version as yourself, and this is my build.json.
I then just change to release and build solution to get release.apk
I know cmd4life, apologies if offended!
Try changing build.gradle' if (task.name == 'validateReleaseSigning') to if (task.name == 'assembleRelease').
This is probably related to the gradle version update in recent cordova-android updates.
Update: It seems that validateReleaseSigning task name was changed to validateSigningRelease in the newer Gradle version :\
So, the issue should be fixed in a next platform release (current is 6.2.0-dev).
Update #2: The PR was merged so you can use cordova platform add https://github.com/apache/cordova-android for now (beware of unreleased versions though).

Categories

Resources