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

Upload with debugSymbols return "Error: Validation of uploaded file failed." #204

Open
koraybalci opened this issue Nov 20, 2023 · 5 comments

Comments

@koraybalci
Copy link

Hey there,

I am trying to add upload debug symbols and getting the following error:
image

  • When I comment out debugSymbols param, all good. no issues.
  • When I pass an invalid folder name for debugSymbols, I get a different error Unable to find 'debugSymbols'. So, I presume have the folder and everything correctly generated.

Here's how I create my bundle before the upload step:

- name: Create Android appbundle release
        run: |
          mkdir debug-symbols
          flutter build appbundle \
            --release \
            --obfuscate --split-debug-info=debug-symbols \
            --target lib/main.dart

Is there a way to get more info on what's wrong? Any insights would be appreciated.

@seesharpguy
Copy link

seesharpguy commented Dec 3, 2023

I too am getting same message. I feel like its coming from androidPublisher.edits.deobfuscationfiles.upload.

async function uploadDebugSymbolsFile(appEditId: string, versionCode: number, options: EditOptions) {
    if (options.debugSymbols != undefined && options.debugSymbols.length > 0) {
        const fileStat = lstatSync(options.debugSymbols);

        let data: Buffer | null = null;
        if (fileStat.isDirectory()) {
            data = await createDebugSymbolZipFile(options.debugSymbols);
        }

        if (data == null) {
            data = readFileSync(options.debugSymbols);
        }

        if (data != null) {
            core.debug(`[${appEditId}, versionCode=${versionCode}, packageName=${options.applicationId}]: Uploading Debug Symbols file @ ${options.debugSymbols}`);
            await androidPublisher.edits.deobfuscationfiles.upload({
                auth: options.auth,
                packageName: options.applicationId,
                editId: appEditId,
                apkVersionCode: versionCode,
                deobfuscationFileType: 'nativeCode',
                media: {
                    mimeType: 'application/octet-stream',
                    body: Readable.from(data)
                }
            })
        }
    }
}

What is the easiest way to turn on DEBUG logging?

@boswelja
Copy link
Collaborator

boswelja commented Feb 7, 2024

If the error really is coming from androidPublisher.edits.deobfuscationfiles.upload, then unfortunately that's all the information Google's API has given us. If it's still an issue, you could try uploading the same debug symbols directly to the Play Console and see what it says.

Steps to enable debug logging can be found here: https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging

@coolusaHD
Copy link

coolusaHD commented Mar 14, 2024

Same problem here
Any update on this ?

I also tried to use a zip instead of a folder path but both returns the same.

@coolusaHD
Copy link

@koraybalci
I forked the action and added more debugging

I get the following error messages:

Error: ***"config":***"url":"https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.example.app/edits/16383701234094753439/apks/139/deobfuscationFiles/nativeCode?uploadType=media","method":"POST","apiVersion":"","userAgentDirectives":[***"product":"google-api-nodejs-client","version":"7.0.0","comment":"gzip"***],"data":***"fd":null,"path":"symbols.zip","flags":"r","mode":438,"end":null,"bytesRead":36434859,"_events":***,"_readableState":***"highWaterMark":65536,"buffer":[],"bufferIndex":0,"length":0,"pipes":[],"awaitDrainWriters":null***,"_eventsCount":1***,"headers":***"x-goog-api-client":"gdcl/7.0.0 gl-node/20.13.1","content-type":"application/octet-stream","Accept-Encoding":"gzip","User-Agent":"google-api-nodejs-client/7.0.0 (gzip)","Authorization":"***"***,"params":***"uploadType":"media"***,"retry":true,"body":***"fd":null,"path":"symbols.zip","flags":"r","mode":438,"end":null,"bytesRead":36434859,"_events":***,"_readableState":***"highWaterMark":65536,"buffer":[],"bufferIndex":0,"length":0,"pipes":[],"awaitDrainWriters":null***,"_eventsCount":1***,"responseType":"unknown","retryConfig":***"currentRetryAttempt":0,"retry":3,"httpMethodsToRetry":["GET","HEAD","PUT","OPTIONS","DELETE"],"noResponseRetries":2,"statusCodesToRetry":[[100,199],[429,429],[500,599]]***,"response":***"config":***"url":"https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.example.app/edits/16383712340094753439/apks/139/deobfuscationFiles/nativeCode?uploadType=media","method":"POST","apiVersion":"","userAgentDirectives":[***"product":"google-api-nodejs-client","version":"7.0.0","comment":"gzip"***],"data":***"fd":null,"path":"symbols.zip","flags":"r","mode":438,"end":null,"bytesRead":36434859,"_events":***,"_readableState":***"highWaterMark":65536,"buffer":[],"bufferIndex":0,"length":0,"pipes":[],"awaitDrainWriters":null***,"_eventsCount":1***,"headers":***"x-goog-api-client":"gdcl/7.0.0 gl-node/20.13.1","content-type":"application/octet-stream","Accept-Encoding":"gzip","User-Agent":"google-api-nodejs-client/7.0.0 (gzip)","Authorization":"***"***,"params":***"uploadType":"media"***,"retry":true,"body":***"fd":null,"path":"symbols.zip","flags":"r","mode":438,"end":null,"bytesRead":36434859,"_events":***,"_readableState":***"highWaterMark":65536,"buffer":[],"bufferIndex":0,"length":0,"pipes":[],"awaitDrainWriters":null***,"_eventsCount":1***,"responseType":"unknown"***,"data":***"error":***"code":400,"message":"Validation of uploaded file failed.","errors":[***"message":"Validation of uploaded file failed.","domain":"global","reason":"badRequest"***],"status":"INVALID_ARGUMENT"***,"headers":***"alt-svc":"h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000","content-length":"281","content-type":"application/json; charset=UTF-8","date":"Wed, 11 Sep 2024 23:52:02 GMT","server":"UploadServer","vary":"Origin, X-Origin, Referer","x-guploader-uploadid":"AD-8ljtw7LTdXlm1ZNd_yPUfYzpX5WRz6AMjdP-QdKKrm5Cf0-WBhf-4L6MzQReB-AeWw6LKDJOldQME_g"***,"status":400,"statusText":"Bad Request","request":***"responseURL":"https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/com.example.app/edits/163837012340094753439/apks/139/deobfuscationFiles/nativeCode?uploadType=media"***,"status":400,"code":400,"errors":[***"message":"Validation of uploaded file failed.","domain":"global","reason":"badRequest"***]***

But still the result is Validation of uploaded file failed.

@sheenhx
Copy link

sheenhx commented Sep 27, 2024

It cost me a day to find the problem for flutter build

build/app/intermediates/flutter/googlePlayRelease

The native debug symbols are here in my build , will need to zip them.
flutter debug symbols --split-debug-info files will be rejected.

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

5 participants