aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.43k stars 2.13k forks source link

XR Guide Setup Issue #1751

Closed ghost closed 6 years ago

ghost commented 6 years ago

I am working through the XR Guide and I am getting the following error -

Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0 at SumerianProvider. (SumerianProvider.js:158) at step (SumerianProvider.js:42) at Object.next (SumerianProvider.js:23) at fulfilled (SumerianProvider.js:14) (anonymous) @ SumerianProvider.js:158 step @ SumerianProvider.js:42 (anonymous) @ SumerianProvider.js:23 fulfilled @ SumerianProvider.js:14 Promise.then (async) step @ registerServiceWorker.js:117 (anonymous) @ registerServiceWorker.js:117 (anonymous) @ registerServiceWorker.js:117 loadAndStartScene @ XRPanel.js:39 componentDidMount @ XRPanel.js:25 commitLifeCycles @ react-dom.development.js:14685 commitAllLifeCycles @ react-dom.development.js:15905 callCallback @ react-dom.development.js:145 invokeGuardedCallbackDev @ react-dom.development.js:195 invokeGuardedCallback @ react-dom.development.js:248 commitRoot @ react-dom.development.js:16075 completeRoot @ react-dom.development.js:17463 performWorkOnRoot @ react-dom.development.js:17391 performWork @ react-dom.development.js:17295 performSyncWork @ react-dom.development.js:17267 requestWork @ react-dom.development.js:17155 scheduleWork @ react-dom.development.js:16949 scheduleRootUpdate @ react-dom.development.js:17637 updateContainerAtExpirationTime @ react-dom.development.js:17664 updateContainer @ react-dom.development.js:17691 ./node_modules/react-dom/cjs/react-dom.development.js.ReactRoot.render @ react-dom.development.js:17957 (anonymous) @ react-dom.development.js:18097 unbatchedUpdates @ react-dom.development.js:17518 legacyRenderSubtreeIntoContainer @ react-dom.development.js:18093 render @ react-dom.development.js:18152 ./src/index.js @ index.js:11 webpack_require @ bootstrap 079343b1cd95e311a63d:678 fn @ bootstrap 079343b1cd95e311a63d:88 1 @ lib fs:1 webpack_require @ bootstrap 079343b1cd95e311a63d:678 ./node_modules/@aws-amplify/analytics/lib/Analytics.js.__awaiter @ bootstrap 079343b1cd95e311a63d:724 (anonymous) @ bootstrap 079343b1cd95e311a63d:724

I am not sure that I am downloading the sumerian config file correctly as I think the export functionality has changed. I don't see that option on the Publish dialog but tried to use the ctrl-e - config file export functionality and referencing it as a json file to load into the XR.configure

`import { Analytics, XR } from 'aws-amplify'; import demoSceneConfig from './demo-scene.json'; // This file will be generated by the Sumerian AWS Console

XR.configure({ // XR category configuration SumerianProvider: { // Sumerian specific configuration region: 'us-east-1', scenes: { "splash": { // Friendly scene name sceneConfig: demoSceneConfig // Scene configuration from Sumerian publish } } } }});`

Thanks!

John

jordanranz commented 6 years ago

Hey @alloatech,

This error happens when there is something wrong with the sumerian scene configuration downloaded after publish. Unfortunately, the ctrl + e export is not currently supported for this use case.

Is this a scene you have already published?

jordanranz commented 6 years ago

You can privately publish a scene and get the correct scene configuration used for Amplify in the upper right corner of your Sumerian console. Looks like this:

sumerian_host_privately_button
jordanranz commented 6 years ago

Closing this issue as I have added relevant documentation here: https://aws-amplify.github.io/docs/js/xr

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.