Model SDK error: requested route does not exist

0
I tried running my SDK script, which worked in the past, but now I got the following error. It doesn't look like an error I can fix, does anyone have experience with this? Creating new online working copy for project [hash]: [project] Successfully created new online working copy [hash] for project [hash]: [project] Failed to open new online working copy [hash] for project [hash]: [project]: Something went wrong: { error: '404 Not Found: Requested route (\'model-api.cfapps.io\') does not exist.\n', statusCode: 404, url: 'https://model-api.cfapps.io/v1/wc/[hash]', requestPayload: null }
asked
2 answers
3

I think (Model SDK team, correct me if I'm wrong) you are using an old Model SDK version. Could you check by looking at your dependency (see package.json -> dependencies -> mendixmodelsdk). If this states lower than 1.1.1 (see https://world.mendix.com/display/ReleaseNotes/Model+SDK+1.1.1 for the latest version) then I'm correct.

If so, fix it by doing the following:

  • Delete the 'mendixmodelsdk' and 'mendixplatformsdk' entries from your package.json
  • Open your rootfolder of your project (same folder as package.json) in a terminal or commandline (cmd) window
  • Enter: 'npm install mendixmodelsdk --save' & hit enter
  • Do the same with the platformsdk: 'npm install mendixplatformsdk --save'

VoilĂ .... you've updated your platform & model sdk package to the latest version (& saved it in package.json by using --save for future reference)

Version 1.0.2 included fix #585226 (https://world.mendix.com/display/ReleaseNotes/Model+SDK+1.0.2) which states: "All Model API infrastructure has been moved to Europe and the default endpoint of the API is updated."

answered
0

I followed this tutorial and now mine works fine:

https://world.mendix.com/display/MXSDK/Setting+up+your+development+environment

This entire setup has to be done in "run as administrator" mode. Every program you open should be ran as administrator.

At "Setting up a working directory for your script", I changed directories to C:\Program Files\Mendix to create the my app generator folder.

Here's what I added to the package.json file.

{

"name": "my-app-generator",

"version": "1.0.0",

"description": "",

"main": "index.js",

"scripts": {

"test": "echo \"Error: no test specified\" && exit 1"

},

"keywords": [],

"author": "",

"license": "ISC",

"dependencies": {

"mendixmodelsdk": "^2.2.2",

"mendixplatformsdk": "^2.0.0",

"when": "^3.7.7"

}

}

The tutorial uses an outdated "when" statement so I suggest typing it out because the software will pick the correct version.

The rest of the steps run smoothly. Just make sure that youre in administrator mode.

Hope this helps.

answered