Coder Social home page Coder Social logo

Comments (7)

nprail avatar nprail commented on July 20, 2024

What version of apkup and Node are you using? Also, what shell?

Does it work if you use double quotes?

from apkup.

chenop avatar chenop commented on July 20, 2024

Thanks for checking this out.
Updated versions in the question.

It does not work for double quotes well.

from apkup.

nprail avatar nprail commented on July 20, 2024

Okay. Try again but first run:

export DEBUG=apkup:*

Then paste the full output here. Make sure you redact any sensitive info, though.

from apkup.

chenop avatar chenop commented on July 20, 2024

/path/to/project/node_modules/apkup/node_modules/yargs/build/lib/yargs.js:1132
throw err;
^

AssertionError [ERR_ASSERTION]: Unable to parse release notes
at Object.handler (/path/to/project/node_modules/apkup/dist/cli/upload.js:52:34)
at Object.runCommand (/path/to/project/node_modules/apkup/node_modules/yargs/build/lib/command.js:196:48)
at Object.parseArgs [as _parseArgs] (/path/to/project/node_modules/apkup/node_modules/yargs/build/lib/yargs.js:1053:51)
at Object.get [as argv] (/path/to/project/node_modules/apkup/node_modules/yargs/build/lib/yargs.js:986:25)
at Object. (/path/to/project/node_modules/apkup/dist/cli/index.js:32:18)
at Module._compile (internal/modules/cjs/loader.js:1123:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
at Module.load (internal/modules/cjs/loader.js:972:32)
at Function.Module._load (internal/modules/cjs/loader.js:872:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: 'strictEqual'
}

from apkup.

nprail avatar nprail commented on July 20, 2024

There are two strictEqual checks on the release notes. One checks to make sure that there is an = in the string and then the other splits the string on the = and makes sure that there are two strings as a result. I can't tell which is failing because one check is on line 51 and the other is on line 53 whereas your error message says line 52.

But neither of them should fail and neither should having spaces or not be any different. I'm guessing that it isn't getting the string correctly.

Open node_modules/apkup/dist/cli/upload.js and at about line 50 add a console.log:

var change = _a[_i]; // right after this
console.log(change); // add this

Then run it again. I bet that it will be null or undefined.

from apkup.

chenop avatar chenop commented on July 20, 2024

Tl;Dr - was not apkup fault, I apologize for wasting your time and appreciate your support.

How do I use apkup?
I have a bash script that deploys my app to the play store.
It receive the following parameters:
./deployAndroidToPlayStore.sh -c [version code] -n [version name] -r [release notes]
Example:
./deployAndroidToPlayStore.sh -c 57 -n "1.20.3" -r 'Fixing Floating Button'

I use the first 2 parameters for building:
./gradlew bundleRelease -PversionCode=$c -PversionName=$n

and here is the wrong way of how I invoked apkup with the release notes:
apkup --key key.json --track beta --apk /path/to/app-release.aab --release-notes $r

It turns out its not the right way to do it inside a bash script, after trial and error I came to this:

cmd="apkup --key key.json --track beta --apk /path/to/app-release.aab --release-notes ${r}" 
echo $cmd  
eval $cmd

This way the release parameter are being passed fine to apkup.
So in the end it was a bash issue - leaving this cause maybe it will help someone in the future.
Your last comment helped me to debug it - Thanks!

from apkup.

nprail avatar nprail commented on July 20, 2024

Awesome, I'm glad you figured it out! I was starting to wonder if it was some sort of quote evaluation issue with bash. I've run into similar problems before... It can be quite difficult to debug.

from apkup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.