Create Daml app Unknown error Syntaxerror: unexpected token E in JSON at position 0

I just finished updating my version of the DAML SDK to the latest and when I attempt to login to the Navigator. This is when using the create daml app, I get the following error message:
Unknown error Syntaxerror: unexpected token E in JSON at position 0

What is causing this? Has anyone else had this?

Any suggestions would be great?

Edit: sorry for not being clear at first

this is my URL http://localhost:3000/
I am following the crate daml app tutorial.

I could not find the navigator.log I apologize not sure where to find it


12:41:38.374 [] INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started
12:41:43.440 [pool-1-thread-4] INFO c.d.p.apiserver.LedgerApiServer - Listening on localhost:6865 over plain text.
12:41:43.448 [pool-1-thread-2] INFO com.daml.platform.sandboxnext.Runner - Initialized sandbox version 1.7.0 with ledger-id = create-daml-app-sandbox, port = 6865, dar file = List(.daml\dist\create-daml-app-0.1.0.dar), time mode = wall-clock time, ledger = in-memory, auth-service = AuthServiceWildcard$, contract ids seeding = strong

I didn’t see any errors in my dev console

1 Like

Do you get this error when you try starting the UI by doing:

cd ui/
npm install
npm run-script build
npm start

And using the UI that comes with create-daml-app (as opposed to Navigator)?

1 Like

Hi @davidk, I saw you posted the same question on Stackoverflow. Same request as I left there, we need a bit more information to diagnose this:

Could you share the command you use to start the Navigator, and the log outputs? By default they’d be in navigator.log and sandbox.log . Also, what URL do you get that error on? You could also try opening your browser’s developer console and checking whether there are any requests with error codes and if so, share those here.

The type of error unexpected token E in JSON at position 0 tends to occur when a webapp calls an endpoint which it expects to return a JSON payload, but instead it gets something different like a HTML error page. My best guess is that there was a port mismatch and something other than the Navigator was running on the port that was being called.