Giter Site home page Giter Site logo

Comments (3)

bpowers avatar bpowers commented on August 19, 2024

hi Erik!

This is a bad failure mode/error, but I believe the problem is you need a newer version of wasm-bindgen:

$ cargo uninstall wasm-bindgen
$ cargo install wasm-bindgen
$ wasm-bindgen --version
wasm-bindgen 0.2.92

(the version after you install should be 0.2.92)

from simlin.

erikvullings avatar erikvullings commented on August 19, 2024

Hi Bobby!

Thanks for your prompt reply and offering a fix: it worked like a charm after adding a -cli, i.e.

$ cargo uninstall wasm-bindgen-cli
$ cargo install wasm-bindgen-cli
$ wasm-bindgen --version
wasm-bindgen 0.2.92

And I can build everything again.

Follow-up issue: although I can build it, and start everything just fine, I still cannot login. Via the app GUI, I can create a (dummy) account, but I do not get logged in (I see the login prompt - I can try to login via Google again and select the dummy user, but still no result), and after some time (30sec?), a message appears in the backend console:

erik@PC-28020:~/dev/simlin$ yarn start:backend
yarn run v1.22.22
$ yarn workspace @system-dynamics/server start:backend
$ export FIRESTORE_EMULATOR_HOST=127.0.0.1:8092; export FIREBASE_AUTH_EMULATOR_HOST=127.0.0.1:9099; export GCLOUD_PROJECT=simlin; yarn build && exec node lib/index.js
$ tsc -p tsconfig.json
{"level":"info","message":"model-service started on http://localhost:3030","timestamp":"2024-05-27T13:47:28.878Z"}
{"level":"info","message":"API-LINE status=401 method=\"GET\" path=\"/api/user\" duration_ms=4.3","timestamp":"2024-05-27T13:48:16.761Z"}
{"level":"info","message":"API-LINE status=401 method=\"GET\" path=\"/api/user\" duration_ms=0.5","timestamp":"2024-05-27T13:48:28.340Z"}
{"level":"info","message":"API-LINE status=401 method=\"GET\" path=\"/api/user\" duration_ms=0.7","timestamp":"2024-05-27T13:48:32.292Z"}
{"level":"error","timestamp":"2024-05-27T13:49:12.991Z"}
{"level":"info","message":"API-LINE status=500 method=\"POST\" path=\"/session\" duration_ms=44198.9","timestamp":"2024-05-27T13:49:12.992Z"}
Error: unable to insert or find user [email protected]
    at getOrCreateUserFromProfile (/home/erik/dev/simlin/src/server/lib/authn.js:137:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async FirestoreAuthStrategy.verify (/home/erik/dev/simlin/src/server/lib/authn.js:143:29)
{"level":"error","timestamp":"2024-05-27T13:49:15.432Z"}
{"level":"info","message":"API-LINE status=500 method=\"POST\" path=\"/session\" duration_ms=42884.0","timestamp":"2024-05-27T13:49:15.433Z"}
Error: unable to insert or find user [email protected]
    at getOrCreateUserFromProfile (/home/erik/dev/simlin/src/server/lib/authn.js:137:28)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async FirestoreAuthStrategy.verify (/home/erik/dev/simlin/src/server/lib/authn.js:143:29)

In the console in Edge, I see the following errors:

image

In the firestore console, everything seems to be running fine:

rik@PC-28020:~/dev/simlin$ yarn start:firestore
yarn run v1.22.22
$ (gcloud beta emulators firestore start --host-port=127.0.0.1:8092 &) && yarn workspace @system-dynamics/app run firebase emulators:start
/bin/sh: 1: gcloud: not found
$ /home/erik/dev/simlin/node_modules/.bin/firebase emulators:start
i  emulators: Starting emulators: auth
i  ui: Emulator UI logging to ui-debug.log

┌─────────────────────────────────────────────────────────────┐
│ ✔  All emulators ready! It is now safe to connect your app. │
│ i  View Emulator UI at http://127.0.0.1:4000/               │
└─────────────────────────────────────────────────────────────┘

┌────────────────┬────────────────┬────────────────────────────┐
│ Emulator       │ Host:Port      │ View in Emulator UI        │
├────────────────┼────────────────┼────────────────────────────┤
│ Authentication │ 127.0.0.1:9099 │ http://127.0.0.1:4000/auth │
└────────────────┴────────────────┴────────────────────────────┘
  Emulator Hub running at 127.0.0.1:4400
  Other reserved ports: 4500

Issues? Report them at https://github.com/firebase/firebase-tools/issues and attach the *-debug.log files.

Any suggestions on how to proceed now?

from simlin.

erikvullings avatar erikvullings commented on August 19, 2024

Hi Bobby!

I've discovered why I could not log in. As it turns out, I also needed to install the gcloud and the firestore emulator (following this guide), a hefty install of almost 1GB.

# Install the keyring
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main

sudo apt-get update && sudo apt-get install google-cloud-cli
sudo apt-get install google-cloud-cli-firestore-emulator

from simlin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.