Appgyver Steroids App working perfectly in iOS but not Android due to being unable to create a Sandbox DB


#1

I have a Steroids app that recently stopped working in Android. I’m getting an error that cloud-resources.js can’t be found on both iOS and Android, but only Android seems to be trying to execute the 404 response HTML, which I think is breaking the rest of the JavaScript in the app. The error I get in the browser inspector is:

So I followed the tutorial to get a Sandbox DB going but it won’t work in my app. (I managed to get it working in a fresh empty Steroids App which starts with the same 404 error, but not this App that has had a lot of development work done on it). The message I get in Terminal is:

Jasons-MacBook-Pro:v3 Jason$ steroids data init --debug
[DEBUG] Thu May 12 2016 14:18:01 GMT+0100 (BST) requiring /Users/Jason/.nvm/versions/node/v0.12.14/lib/node_modules/steroids/package.json
[DEBUG] Thu May 12 2016 14:18:01 GMT+0100 (BST) package.json#version: 4.1.23
[DEBUG] Thu May 12 2016 14:18:01 GMT+0100 (BST) Updater: Looking for update: https://updates.appgyver.com/v1/steroids/latest.json?os=Darwin&version=4.1.23&from=data&user_id=21762&ionic=false&cordova=false
[DEBUG] Thu May 12 2016 14:18:01 GMT+0100 (BST) DATA: Initializing data for project
[DEBUG] Thu May 12 2016 14:18:01 GMT+0100 (BST) SANDBOXDB: Initializing Sandbox DB
[DEBUG] Thu May 12 2016 14:18:01 GMT+0100 (BST) SANDBOXDB: Reading configuration from file /Users/Jason/.Trash/earlystimulus-native.dev/v3/config/sandboxdb.yaml
[DEBUG] Thu May 12 2016 14:18:01 GMT+0100 (BST) SANDBOXDB: Configuration file /Users/Jason/.Trash/earlystimulus-native.dev/v3/config/sandboxdb.yaml was missing
[DEBUG] Thu May 12 2016 14:18:01 GMT+0100 (BST) SANDBOXDB: Sandbox DB not created, creating a new one.
[DEBUG] Thu May 12 2016 14:18:01 GMT+0100 (BST) SANDBOXDB: Creating Sandbox DB
[DEBUG] Thu May 12 2016 14:18:01 GMT+0100 (BST) SANDBOXDB: Provisioning Sandbox DB
[DEBUG] Thu May 12 2016 14:18:01 GMT+0100 (BST) SANDBOXDB: POSTing data: {"appId":11905} to path: /v1/credentials/provision
[DEBUG] Thu May 12 2016 14:18:01 GMT+0100 (BST) Updater: updates.appgyver.com says that the latest version is 4.1.22
[DEBUG] Thu May 12 2016 14:18:10 GMT+0100 (BST) SANDBOXDB: Provisioning Sandbox DB returned failure: [object Object]
Steroids Error
Debug Log:
Thu May 12 2016 14:18:01 GMT+0100 (BST) requiring /Users/Jason/.nvm/versions/node/v0.12.14/lib/node_modules/steroids/package.json
Thu May 12 2016 14:18:01 GMT+0100 (BST) package.json#version: 4.1.23
Thu May 12 2016 14:18:01 GMT+0100 (BST) Updater: Looking for update: https://updates.appgyver.com/v1/steroids/latest.json?os=Darwin&version=4.1.23&from=data&user_id=21762&ionic=false&cordova=false
Thu May 12 2016 14:18:01 GMT+0100 (BST) DATA: Initializing data for project
Thu May 12 2016 14:18:01 GMT+0100 (BST) SANDBOXDB: Initializing Sandbox DB
Thu May 12 2016 14:18:01 GMT+0100 (BST) SANDBOXDB: Reading configuration from file /Users/Jason/.Trash/earlystimulus-native.dev/v3/config/sandboxdb.yaml
Thu May 12 2016 14:18:01 GMT+0100 (BST) SANDBOXDB: Configuration file /Users/Jason/.Trash/earlystimulus-native.dev/v3/config/sandboxdb.yaml was missing
Thu May 12 2016 14:18:01 GMT+0100 (BST) SANDBOXDB: Sandbox DB not created, creating a new one.
Thu May 12 2016 14:18:01 GMT+0100 (BST) SANDBOXDB: Creating Sandbox DB
Thu May 12 2016 14:18:01 GMT+0100 (BST) SANDBOXDB: Provisioning Sandbox DB
Thu May 12 2016 14:18:01 GMT+0100 (BST) SANDBOXDB: POSTing data: {"appId":11905} to path: /v1/credentials/provision
Thu May 12 2016 14:18:01 GMT+0100 (BST) Updater: updates.appgyver.com says that the latest version is 4.1.22
Thu May 12 2016 14:18:10 GMT+0100 (BST) SANDBOXDB: Provisioning Sandbox DB returned failure: [object Object]

Error with: steroids data

ProvisionError
    at Request._callback (/Users/Jason/.nvm/versions/node/v0.12.14/lib/node_modules/steroids/src/steroids/data/SandboxDB.coffee:147:27)
    at Request.self.callback (/Users/Jason/.nvm/versions/node/v0.12.14/lib/node_modules/steroids/node_modules/request/request.js:344:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (/Users/Jason/.nvm/versions/node/v0.12.14/lib/node_modules/steroids/node_modules/request/request.js:1239:14)
    at Request.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (/Users/Jason/.nvm/versions/node/v0.12.14/lib/node_modules/steroids/node_modules/request/request.js:1187:12)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickDomainCallback (node.js:381:11)

Runtime information:

    platform: darwin    node path: /Users/Jason/.nvm/versions/node/v0.12.14/bin/node
    arch: x64       node version: v0.12.14

    cwd: /Users/Jason/.Trash/earlystimulus-native.dev/v3

Please send the above output to contact@appgyver.com
  (Also if possible, re-run the same command with --debug and please send that output too)
Jasons-MacBook-Pro:v3 Jason$ 

So the question is, how do I get my app working on Android?

Any help will be greatly appreciated, TIA!

I’m using Steroids v4.1.23, Node 0.12.14 and NPM 2.15.1.

Ps, this has also been posted on Stack Overflow.


#2

how did you go? any luck?


#3

Yeah, sort of, the solution to this specific problem was to create a brand new app elsewhere on my computer, initialise data there and copy in cloud-resources.raml, cloud.json and sandboxdb.yaml files from the config folder in the new app in to the config file in the old app.

Unfortunately this wasn’t the problem with the Android app, it was an issue with having logged myself in to the API on my local machine, swapping the app back to connecting to the staging API while the app still thought I was logged in and that broke everything.

The missing file is still being linked after I removed the files I added from the new app, but it’s not causing any issues as far as I can tell.