imodeljs / imodeljs-samples

MIT License
33 stars 25 forks source link

'localhost:3000 says Project with name "<Name of iModel>" does not exist' #40

Open richhum3 opened 3 years ago

richhum3 commented 3 years ago

I have the simple viewer app running on localhost. Once I have clicked on 'Open Sample iModel', I get message 'localhost:3000 says Project with name "" does not exist'. I believe its me not setting imjs_test_imodel and imjs_test_project correctly. I've tried a number of times trying different syntax and then rebuilding the app, only to get the same stumbling block. No doubt its me but any advice greatly appreciated. Copy of .env.local below:

-----------------------------------------------------------------------------------------------------------

Project and iModel (REQUIRED)

Must un-comment the lines below and set these variables before testing - create a new project and

iModel with the developer registration procedure here - https://git.io/fx8YP

-----------------------------------------------------------------------------------------------------------

Set this to the name of the sample iModel

imjs_test_imodel="via-model"

(Optional) Set this to the name of the sample project. Defaults to name of the iModel.

imjs_test_project="via-model"

(Optional) Un-comment to use general-purpose-backend. Default value is 0 = local backend

imjs_backend=1

-----------------------------------------------------------------------------------------------------------

Client registration (RECOMMENDED but OPTIONAL)

Must set these variables before deployment, but the supplied defaults can be used for testing on localhost.

Create a client registration using the procedure here - https://git.io/fx8YP (Developer registration). For the purpose

of running this sample on localhost, ensure your registration includes http://localhost:3000/signin-oidc as a

valid redirect URI.

-----------------------------------------------------------------------------------------------------------

Set this to the registered clientId

Note: "imodeljs-spa-samples-2686" is setup to work with the (default) localhost redirect URI below

imjs_browser_test_client_id="imodeljs-spa-samples-2686"

Use this client id when running electron app

imjs_electron_test_client_id="imodeljs-electron-samples"

Set this to be the registered redirect URI

Note: "http://localhost:3000/signin-callback" is setup to work with the (default) web clientId above

imjs_browser_test_redirect_uri="http://localhost:3000/signin-callback.html"

Set this to be the registered post signout redirect URI

imjs_browser_test_post_signout_redirect_uri="http://localhost:3000/"

This redirect uri is set up to be used with the electron clientId above

imjs_electron_test_redirect_uri="http://localhost:3000/signin-callback"

Set this to be the scopes of services the application needs to access

Note: The default value set above ensures the minimal working of the application

imjs_browser_test_scope="openid email profile organization imodelhub context-registry-service:read-only product-settings-service general-purpose-imodeljs-backend imodeljs-router urlps-third-party"

williamkbentley commented 3 years ago

Hey,

I have a few suggestions: