fabric8-launcher / launcher-openshift-templates

OpenShift Templates for the Fabric8 Launcher application
http://launcher.fabric8.io
Apache License 2.0
5 stars 17 forks source link

Javascript Error on Frontend #28

Closed lance closed 7 years ago

lance commented 7 years ago

Hi - I am not sure if this is the best place to report this issue or not. If there is somewhere else more appropriate, please let me know.

I have tried running launchpad with my local minishift installation a number of times, both manually and using this template.

In both cases, after I create the project, import the template, and deploy the applications, I then need to manually create a route for launchpad-frontend, which I find odd (and may require an issue of its own). I only mention it because the problem I am seeing is on the front end, so it may be related.

After creating the route, I can follow the link to http://launchpad-frontend-launchapd.192.168.99.101.nip.io/ (for example) and am redirected to /wizard. When I click the big "LAUNCH YOUR PROJECT BUTTON", I immediately see this error.

screen shot 2017-09-06 at 8 55 29 am

When I open the Javascript console in Chrome, I see this stack trace.

/app.57fe4094c5fd119dc4a2.js:3 An error occurred SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at e.t.json (/vendor.57fe4094c5fd119dc4a2.js:642)
    at /app.57fe4094c5fd119dc4a2.js:3
    at t.invoke (/polyfills.57fe4094c5fd119dc4a2.js:58)
    at Object.onInvoke (/vendor.57fe4094c5fd119dc4a2.js:176)
    at t.invoke (/polyfills.57fe4094c5fd119dc4a2.js:58)
    at r.run (/polyfills.57fe4094c5fd119dc4a2.js:58)
    at /polyfills.57fe4094c5fd119dc4a2.js:65
    at t.invokeTask (/polyfills.57fe4094c5fd119dc4a2.js:58)
    at Object.onInvokeTask (/vendor.57fe4094c5fd119dc4a2.js:176)
    at t.invokeTask (/polyfills.57fe4094c5fd119dc4a2.js:58)
    at r.runTask (/polyfills.57fe4094c5fd119dc4a2.js:58)
    at o (/polyfills.57fe4094c5fd119dc4a2.js:58)
    at n.invokeTask [as invoke] (/polyfills.57fe4094c5fd119dc4a2.js:58)
    at v (/polyfills.57fe4094c5fd119dc4a2.js:23)
    at XMLHttpRequest.d (/polyfills.57fe4094c5fd119dc4a2.js:23)

It looks like whatever is attempting to parse JSON is getting a string <anonymous> instead of the expected JSON, and then blowing up. But because the UI code is obfuscated, it's not clear to me where this unexpected data is coming from.

Any help getting this resolved would be much appreciated.

gastaldi commented 7 years ago

Do you see any errors in the backend pod log?

gastaldi commented 7 years ago

You don't need to create any routes. The launchpad-nginx is the main route. I believe we have removed the extra routes, use this template instead: https://raw.githubusercontent.com/openshiftio/launchpad-templates/master/openshift/launchpad-template.yaml

lance commented 7 years ago

@gastaldi thank you for the explanation. Creating and using the launchpad-frontend route was my problem. Closing due to user error.