Code Monkey home page Code Monkey logo

Comments (17)

polluterofminds avatar polluterofminds commented on September 15, 2024

@JayAdityaNautiyal I just did a fresh clone on a macbook with the following versions of node and npm:

Node: 16.17.0
NPM: 8.15.0

When I run npm run setup everything works fine.

Can you share the specific node version and npm version by checking node -v and npm -v?

from verite.

JayAdityaNautiyal avatar JayAdityaNautiyal commented on September 15, 2024

Thanks @polluterofminds
Verite should update its documentation for the pre-requisites section and update the node and npm versions. Though I still had issues running it on windows.

So I spinned a linux machine on Azure and installed node and npm with versions used by you, and the command npm run setup is running fine.

But when I run the npm run wallet and scan the code on screen on the expo go app, I get a network connection timed out on the expo go app for which I have attached a screenshot.

Though the logs for project on cmd does not give an error and says Started Metro Bundler (added a screenshot for this)
Can you please help with it?

WhatsApp Image 2022-09-30 at 1 38 21 PM
image

from verite.

JayAdityaNautiyal avatar JayAdityaNautiyal commented on September 15, 2024

anyone there ?
@polluterofminds
@kimdhamilton

from verite.

polluterofminds avatar polluterofminds commented on September 15, 2024

I'm looking into this now. Because you're running on a VM, I wonder if you're hitting some firewall issues. Expo requires tunneling to run locally. Will try to replicate.

from verite.

JayAdityaNautiyal avatar JayAdityaNautiyal commented on September 15, 2024

thanks @polluterofminds
I thought it was an issue with the cloud so I used local VirtualBox and started a linux machine out of it. I am getting the same error as above on the expo go app.
Maybe this issue is with the VM.
I don't have a Mac OS, can you please look into it so that how can I run the sample.
Thanks.

from verite.

polluterofminds avatar polluterofminds commented on September 15, 2024

Yeah let's try to get this working on your windows machine @JayAdityaNautiyal!

You said:

Verite should update its documentation for the pre-requisites section and update the node and npm versions. Though I still had issues running it on windows.

What exactly were those issues on Windows? Can you share as many details as possible including the errors?

from verite.

JayAdityaNautiyal avatar JayAdityaNautiyal commented on September 15, 2024

sure @polluterofminds
So the issue on running the sample on my windows machine locally was that when I was running the command "npm run setup" , I would get an error that " '.' is not recognized as an internal or external command,
operable program or batch file." I've attached it below:
image
Then I tried to run the commands in the ./bin/setup file, like npm install. That also threw error as :
image

Running it on a VM using virtual box or AZURE cloud, I could run the application and get the qr code on screen but while scanning it from the mobile app it would give "connection timed out error".
So we tried it on mac and the URL for "metro waiting on exp://* " was different in mac(where it is running correctly). So can you also tell where in the code can we enhance these port configurations set the environment variables as I couldn't find where are the ports(like 19000) have been configured. The connection with the URL exp://10.1.0.4:19000 was not done so we can see a way of changing the configuration, and running the code on VM as well.

from verite.

polluterofminds avatar polluterofminds commented on September 15, 2024

Looks like we might need to conditionally update the setup script for Windows. I was under the impression that we had Windows users successfully running this, but maybe not.

This thread indicates that the relative path format of the setup script is throwing things off. If you want to confirm this, you could manually go into the package.json and try updating ./bin/setup to the absolute path of that file on your machine.

https://stackoverflow.com/questions/48321639/error-is-not-recognized-as-an-internal-or-external-command-operable-program-o

from verite.

euj1n0ng avatar euj1n0ng commented on September 15, 2024

Verite is set up as an npm workspace (which requires npm v7 or greater). The dependencies for all packages are installed unifiedly from the root level using npm install. As long as Node.js v14 is LTS, you can use it by upgrading the npm version to 7. (npm i -g npm@7)

Verite's CLI scripts were written in UNIX style (e.g. inline mutli-commands delimited by ; which cannot be parsed in Windows, besides finding the path of a bash script file).
In order to setup the dev environment on Windows, you have to change the UNIX style scripts into Windows style in all package.json files. It sounds a little tricky.

Alternatively, on a Windows machine, we can use WSL without changing UNIX style scripts at all. I think this is the best option.

Regarding the timedout issue in lauching wallet, tunneling application is required in Expo as long as your device isn't connected to your LAN. Once npm packages are installed, you can directly run the wallet by executing npx expo start --tunnel in the wallet folder. (In Expo SDK v45, the UI of tunneling isn't supported anymore, but only available via CLI.)

After all, the current Verite documentation is very correct and has no issue at all.

PS. To avoid the hassles due to npm workspace dependency management, you can extract the wallet as an indenpendent repo like this. Though I didn't make it up-to-date, it is cross-platform workable at least.

from verite.

JayAdityaNautiyal avatar JayAdityaNautiyal commented on September 15, 2024

Hi @euj1n0ng
I tried using WSL on windows and I was able to run the command npm run setup and npm run dev.
But when I run npm run wallet and scan the qr code on the screen using the mobile app, I get the same **network response timed out ** error.
The output of npm run wallet as received in the console is :
image

And the error on the mobile screen is :
MicrosoftTeams-image (3)
Screenshot_2022-10-09-00-08-36-32_f73b71075b1de7323614b647fe394240

I also extracted the wallet from the independent repo shared by @euj1n0ng and received the same error as above on the mobile application while scanning the qr code.

If you can please fix this from here, it will be a great help.

from verite.

JayAdityaNautiyal avatar JayAdityaNautiyal commented on September 15, 2024

Hi @euj1n0ng @polluterofminds @kimdhamilton
Can you please look into it as few of my folks tried on their windows machine as well and all had same errors!

from verite.

kimdhamilton avatar kimdhamilton commented on September 15, 2024

Hi @JayAdityaNautiyal, in general we're not staffed to help with platform-specific support, but have you tried looking at guidance for similar projects? I.e., I imagine it might be common with other react projects on windows.

We're really glad you're using this project, and we'll leave this issue open in case another windows user can help

from verite.

euj1n0ng avatar euj1n0ng commented on September 15, 2024

Hi @euj1n0ng @polluterofminds @kimdhamilton Can you please look into it as few of my folks tried on their windows machine as well and all had same errors!

As metioned several times in this ticket, you're missing tunneling. You lauched the Metro server only available for LAN. Then, how can Expo Go app request to the server from the Internet?

https://docs.expo.dev/workflow/expo-cli/#tunneling

from verite.

JayAdityaNautiyal avatar JayAdityaNautiyal commented on September 15, 2024

Hi @euj1n0ng , I tried with tunneling and was able to achieve till successful android bundling.
But when I run the npm run dev command from the root folder and run the Basic Issuance demo, as I scan the QR code for any user using the mobile application, there is an error on the mobile application as Network request failed.
No error is received in the console log for the web application.
The QR code I am scanning using the app after android bundling :
image

The mobile application's screenshot after scanning the QR code :
image

Can you please suggest a way to cross this hindrance. That'll be really helpful.

from verite.

euj1n0ng avatar euj1n0ng commented on September 15, 2024

@JayAdityaNautiyal , share your challengeTokenUrl.
I am sure you're troubling with the same issue - tunneling. But, this time, not on the mobile wallet app but on the demo web app.

from verite.

sumitesh9 avatar sumitesh9 commented on September 15, 2024

@euj1n0ng @kimdhamilton @polluterofminds
I have also followed the same steps (tunneling + WSL), and I am hereby sharing the challengeTokenUrl. Does anyone have an idea how to fix the issue?
challengeTokenUrl : "http://172.22.214.169:3000/api/demos/issuer/manifests/kyc/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2NjkxODQ1NDcsImV4cCI6MTY2OTE4ODE0Nywic3ViIjoiMTE1Mzc3MmMtMTBjYi00NjA5LWJkYWYtNzNiYTk4YWMzNjFiIn0.PzTbKr0TSSfOUP_ZPk-QdiaJMpoTWXxsF5iDo9xstVc"
image

from verite.

kimdhamilton avatar kimdhamilton commented on September 15, 2024

I still can't repro

from verite.

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.