Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to fetch connectors #5

Open
quanyshh opened this issue Jun 21, 2023 · 10 comments
Open

Unable to fetch connectors #5

quanyshh opened this issue Jun 21, 2023 · 10 comments

Comments

@quanyshh
Copy link

quanyshh commented Jun 21, 2023

изображение
Hello, an error comes out "Unable to fetch connectors". Are there any instructions on the simulator?

@agruenb
Copy link
Contributor

agruenb commented Jun 26, 2023

This means most probably that the request timed out. Are you sure that the simulator is still running? Try visiting http://localhost:8000/api/connectors in your browser while the simulator is running. If the api is reachable it should display something like: ["1","2"]

@aviarybuilds
Copy link

aviarybuilds commented Dec 22, 2023

the website forces all api calls to localhost. Is there a way to use the computer's IP address instead? i'm trying to run this in a headless VM, and would love to be able to access the web portal through the intranet connection instead of using the browser on the desktop of the PC itself
simulator

@matth-x
Copy link
Owner

matth-x commented Dec 29, 2023

@aviarybuilds The relevant spot in the sources is the nodejs environment manifest (e.g. .env.development). A short documentation of the API root definition is in the API configuration section.

As a general background, the Simulator comes with a compiled version of the dashboard. If you want to change the dashboard (e.g. the API root), then you need to edit the dashboard sources and rebuild it, so that the Simulator can use the new compiled version. A brief overview of the build process is given in this section of the README. Furthermore, the whole README of the dashboard repo is very relevant.

If you encounter any problems, please update this issue with your findings. I only tested the Simulator on the local host so far, but would be very interested in arbitrary base URLs support.

@eiwin
Copy link

eiwin commented Jan 6, 2024

I had the same issue with a headless VM. Then I did this and it works for me.
Copy .env.development to .env.production, and then change localhost to your ip adress. Copied the compiled and compressed file according to the description. Then I can access the webpage using ip adress.
Thanks @matth-x for the beautiful work.

the website forces all api calls to localhost. Is there a way to use the computer's IP address instead? i'm trying to run this in a headless VM, and would love to be able to access the web portal through the intranet connection instead of using the browser on the desktop of the PC itself simulator

@GanesanGuru
Copy link

Hi @matth-x @eiwin ,
I've tried the same by editing the .env.production file, yet unable to compile. I'm getting error @ npm build part. The log is attached as follows. Kindly do let me know, what am I missing!!
ocpp_log.txt

@Gazdella
Copy link

Hello @matth-x , I edited .env.development file with my ip but I cant find .env.production .
I still got same issue "Unable to fetch connectors".
Could you please help me?

@agruenb
Copy link
Contributor

agruenb commented Jun 13, 2024

Hello @matth-x , I edited .env.development file with my ip but I cant find .env.production . I still got same issue "Unable to fetch connectors". Could you please help me?

There is no .env.production file in the repository. You have to manually create it and then copy the contents of the .env.development file into it. After that you can alter the variables to your liking and build the bundle.

There is a short walk-through of the process in the readme.

@Gazdella
Copy link

I created it but still got same error Screenshot 2024-06-14 at 3 35 20 PM

@agruenb
Copy link
Contributor

agruenb commented Jun 14, 2024

Could you please add some more information about the error? Have you opened the browser network tool and checked that the correct address is used? Did you rebuild the webapp manually or did you use the script?

@novta
Copy link

novta commented Jan 24, 2025

I have faced the same problem.
After the
cp .env.development .env.production
in main folder level (MicroOcppSimulator folder) run
sudo bash ./build-webapp/build_webapp.sh
The result is
`:~/MicroOcppSimulator$ sudo bash ./build-webapp/build_webapp.sh
[info] NodeJS and npm need to be installed to build the web-app
Building web-app...
production environment found
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@jest/[email protected]',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@jest/[email protected]',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@svgr/[email protected]',
npm WARN EBADENGINE required: { node: '>=14' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@svgr/[email protected]',
npm WARN EBADENGINE required: { node: '>=14' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>= 14.15.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.9', npm: '8.5.1' }
npm WARN EBADENGINE }

up to date, audited 646 packages in 2s

86 packages are looking for funding
run npm fund for details

17 vulnerabilities (3 low, 5 moderate, 8 high, 1 critical)

To address all issues, run:
npm audit fix

Run npm audit for details.

build
webpack --config webpack_config/webpack.prod.js

[webpack-cli] Failed to load '/home/azadmin/MicroOcppSimulator/webapp-src/webpack_config/webpack.prod.js' config
[webpack-cli] /home/azadmin/MicroOcppSimulator/webapp-src/node_modules/jest-worker/build/index.js:126
enableWorkerThreads: this._options.enableWorkerThreads ?? false,

SyntaxError: Unexpected token '?'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:85:18)
at Object. (/home/azadmin/MicroOcppSimulator/webapp-src/node_modules/css-minimizer-webpack-plugin/dist/index.js:17:5)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

:~/MicroOcppSimulator$`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants