API Response Error: SCHEMA_VALIDATION_ERROR

#1

As of a few hours ago, my expo builds with exp build:android have been failing with the following error:

[exp] API Response Error: SCHEMA_VALIDATION_ERROR

This is a version of my code that successfully compiled a few days ago.

I’ve experienced glitches with expo’s cloud build process in the past, so I’m wondering if someone else is experiencing this now. If not, what is the schema this error might be referring to?

My complete log for exp build:android is:

[exp] Making sure project is set up correctly...
/[exp] Warning: Not using the Expo fork of react-native. See https://docs.expo.io/.
-[exp] Warning: 'react-native' peer depencency missing. Run `npm ls` in /home/welshamy/workspace/grammfrontendv2 to see full warning.
[exp] 
[exp] If there is an issue running your project, please run `npm install` in /home/welshamy/workspace/grammfrontendv2 and restart.
[exp] Your project looks good!
[exp] Checking if current build exists...

[exp] No currently active or previous builds for this project.
[exp] Starting build process...
[exp] Unable to find an existing exp instance for this directory, starting a new one...
[exp] Warning: Problem validating asset fields in app.json. See https://docs.expo.io/
[exp]  • 'icon' should have dimensions 512x512, but the file at './app/assets/images/gramm-icon-v3.png' has dimensions 300x300.
[exp]  • cannot access file at './assets/images/gramm-icon-v3.png' for field 'loading.icon'.
[exp] Warning: Not using the Expo fork of react-native. See https://docs.expo.io/.
[exp] Warning: 'react-native' peer depencency missing. Run `npm ls` in /home/welshamy/workspace/grammfrontendv2 to see full warning.
[exp] 
[exp] If there is an issue running your project, please run `npm install` in /home/welshamy/workspace/grammfrontendv2 and restart.
[exp] Starting React Native packager...
[exp] Scanning 789 folders for symlinks in /home/welshamy/workspace/grammfrontendv2/node_modules (6ms)
[exp] Loading dependency graph.
[exp] Running packager on port 19002.
[exp] Sucessfully ran `adb reverse`. Localhost urls should work on the connected Android device.
[exp] Publishing...
[exp] Building iOS bundle
[exp] Dependency graph loaded.
[exp] Finished building JavaScript bundle in 19110ms.
[exp] Building Android bundle
[exp] Finished building JavaScript bundle in 2459ms.
[exp] Analyzing assets
[exp] Finished building JavaScript bundle in 2338ms.
[exp] Finished building JavaScript bundle in 2310ms.
[exp] Uploading assets
[exp] No assets changed, skipped.
[exp] Uploading JavaScript bundles
[exp] API Response Error: SCHEMA_VALIDATION_ERROR
0 Likes

#2

Hi there!

In your pasted log, there are two issues that need to be addressed in your app.json:

• ‘icon’ should have dimensions 512x512, but the file at ‘./app/assets/images/gramm-icon-v3.png’ has dimensions 300x300.
• cannot access file at ‘./assets/images/gramm-icon-v3.png’ for field ‘loading.icon’.

The reason you weren’t seeing this error before was because we turned on stricter app.json validation this evening. In a future version of exp, this error will be made more clear.

Thanks!
-Adam

1 Like

#3

Hi Expo,

I also getting this SCHEMA_VALIDATION_ERROR today for exp publish and exp build: android

Here is my log

[exp] Publishing...
[exp] Building iOS bundle
[exp] Building Android bundle
[exp] Analyzing assets
[exp] Uploading assets
[exp] No assets changed, skipped.
[exp] Uploading JavaScript bundles
[exp] API Response Error: SCHEMA_VALIDATION_ERROR
0 Likes

#4

@skevy Thanks a lot. Fixed.

0 Likes

#5

@brightspot look for any warnings in your log when you run exp publish.

0 Likes

#6

Hi Skevy,

Here is the warning I got

[exp] Warning: Problems validating fields in app.json. See https://docs.expo.io/versions/v17.0.0/guides/configuration.html.
[exp]  • 'ios.buildNumber' should match pattern "^[0-9]+$".
[exp]  • android should NOT have additional property 'permissions'.
[exp]  • should be integer.
[exp] Warning: Not using the Expo fork of react-native. See https://docs.expo.io/.
0 Likes

#7

Hi Skevy,

I recognize the problem is because of the warnings. How do give android permission in expo 17?

0 Likes

#8

Hi there!

I am also getting the following error while publishing the appication

Failed to publish package: API Response Error: SCHEMA_VALIDATION_ERROR

I have the app running in Google Play Store and App Store. And today I had transferred my app in App Store from one apple account to another, I am not sure whether I am getting the error because of it.

This app used to successfully publish through expo earlier. I am not able to trace why this issue is occurring.

Any help at the earliest would be highly appreciated!

Thanks,
Chitra

0 Likes

#9

@chitra05 can you post logs of this? The Warnings in those logs may be indicative of why you are getting this error

0 Likes

#10

@brightspot i think the warning means that your app.json shouldnt have the property android.permissions

0 Likes

#11

Hi @quinlanj,

Thanks for the response!

I had defined icon for ios and android in expo.json, which is not allowed!

“ios”: {
“buildNumber”: “2”,
“supportsTablet”: true,
“bundleIdentifier”: “xx.xxx.xxx”,
“icon”: “./image_path”
},
“android”: {
“versionCode”: 2,
“package”: “xx.xxx.xxx”,
“icon”: “./image_path”
}

0 Likes