ForestAdmin: Unlock your data. CORS configuration issue - node.js

I try to install ForestAdmin but get an error after set up my account and generate my lumber db.
What I did :
lumber generate -c 'mongodb+srv://ugo:<my-password>#tlf-qraep.mongodb.net/test?retryWrites=true&w=majority' test
cd test
npm install
npm install lumber-forestadmin --save
lumber install lumber-forestadmin --email <my-mail> --projectName test
npm start
I got this message so I clicked on it
Your admin panel is available here: https://app.forestadmin.com/49189
I re-entered my password but I got this error message :
"Unlock your data
Oops, cannot reach your application. Are you sure it is running? If your application is running, you might have a CORS configuration issue."
I checked and my server running on port localhost 3000.
Someone already got this error message?
Thx for the help guys.

I finally succeed to remove the error. I generated a new lumber on an other port (3003 rather than 3000) and it worked for me !

Maybe another app is using the 3000 port ?

Related

JFrog Artifactory OSS: UI service unavailable, "Trying to connect an http1.x server"

I'm trying to set up a new JFrog Artifactoy OSS server on a Windows 10 machine.
While it actually seems to be up and running the UI is not working. When trying to open http://localhost:8082/ui/ I just get a "Service unavailable" error.
In the /var/log/frontend-service.log I see the following error:
[main ] - Couldn't register on Router, retry number: 120, Error : [Trying to connect an http1.x server]
I couldn't find any errors in the other logs.
I already made some desperate attempts in my system.yaml like setting the IP manually, tested setting a proxy, etc. But no luck. Any ideas what might be going on here?
I also had the same problem, I solved it by exposing port 8082 as well:
docker run --name artifactory -d -p 8081:8081 -p 8082:8082 docker.bintray.io/jfrog/artifactory-oss:latest
I had this issue with version 7.7.3 and I just reverted to an older version I had 7.5.7 and it worked fine for me.

Connection refused on localhost

I am trying to work on my nodejs and reactjs app at school but everytime I run the server, I get an error with
localhost:PORT/net::ERR_CONNECTION_REFUSED
Is the wifi refusing the connection on localhost?
PS: The react side renders correctly
If you're using WSL (linux on windows), restart its service LxssManager Servie (run services.msc) and try again.
Try changing the url from localhost to 127.0.0.1 . If it works, then it means your environment is not resolving localhost to 127.0.0.1
Or Try with changing the PORT Number
For those of you that the approved solution didn't work for (changing localhost to 127.0.0.1) I was able to fix this just by restarting my computer. Not sure what caused the issue but the day before today my app was working fine and then today I got hit with this error. Restarting fixed the issue.
In my case I have an error with require in setupProxy.js
In my case, deleting the node_modules and then reinstalling using npm install worked.
I was also facing this problem on mac m1 from last 2 days, so finally i ended fixing the issue by :-
Run 'npm start' from default shell(/bin/bash) on vs code.
You can also try to update the node version.
You may need to change the port for application only if some other application is running on default port(3000)
In my case, I resolved the issue using "npm start" command again in terminal of vs code and it works.
In my case I had made changes to the setupProxy.js that caused the problem. Try reverting back to something that is working, such as:
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function(app) {
app.use(
'/api',
createProxyMiddleware({
target: 'http://localhost:5000',
changeOrigin: true,
})
);
};
Rebooting the system (linux) worked for me. Consider rebooting first.
the problem of "localhost refused to connect." is occur because of command prompt that you closed so you must keep open your command prompt after hit "npm start" command till you work in "App.JS" file.
i'm sure this will work 100%.

Failed to connect before deadline

When I run query.js (similar to query.js in fabcar but modified for my application), I keep getting an error which says,
Failed to connect before the deadline
I have changed the localhost to docker IP address in enrollAdmin.js and registerUser.js
TLS is enabled for peer, orderer and cli.
Any help would be appreciated. Thanks
I had the exact same problem. These steps fixed it for me:
Open VirtualBox Manager and select the “default” VM
Click “Settings”, “Network”, “Advanced”, “Port Forwarding”.
Create a new rule by clicking the “+” sign on the right and entering the following: Name -> “grpc”, Host Port -> 7051, Guest Port -> 7051
You can leave the Host IP and Guest IP unspecified.
Thx to: https://developer.ibm.com/opentech/2017/11/29/running-hyperledger-fabric-windows-revised/
I had the same problem:
I think grpc and fabric-client package has issues or different versions than we need (verify the package.json for npm) . Therefore I decided to manually install the latest versions of the npm fabric-ca-client, fabric-client and grpc packages and it worked!!!!
I hope this solution works for you!!
I had the same issue as well
What works for me is that I reinstall the global window-build-tools and global grpc, and it works afterwards. Hope it helps!
What worked for me was changing the localhost to Docker's IP(seen when the docker terminal starts) in the network connections file(either connections.json or networkConnections.yaml) being used in the query.js(or any other js).

Heroku Login cmd permission issue for Windows 10

I installed heroku cli.
$ heroku --version
heroku-cli/6.14.36-15f8a25 (windows-x64) node-v8.7.0
Started cmd.exe as admin
$ heroku login (asked me for username and password)
After I provided the username and password. I get the following error:
! EACCES: connect EACCES 34.234.38.27:443
I tried using gitbash to login in heroku. I get the same error message if I try same thing in git bash using the following cmd:
winpty heroku login
I have looked everywhere I could. Most places have closed the tickets but there is no solution anywhere. I also tried deleting the heroku folder from appdata/local/ but that also didn't help. I know its permission issue. I get a better error message when I try
$ heroku update
heroku-cli: Updating plugins... done
! Get https://cli-assets.heroku.com/branches/v6/manifest.json: dial tcp 52.84.64.82:443: connectex: An attempt was made to access a socket in a way forbidden by its access permissions.
I want to host a small NodeJS app for free. What are my other options because if I have to spend so much time just deploying then maybe it is not an option.
maybe your problem is the firewall or the antivirus, add the exception for the address that shows you (34.234.38.27:443), and do the test. Also check your antivirus if it is not blocking you heroku cli, and always run in administrator mode
You can also do the following. Enable debugging during login. Make sure to redact your password from the output before sending it to support! Enable it by running set HEROKU_DEBUG=true; set HEROKU_DEBUG_HEADERS=1; heroku login on Windows to get more information.
Good luck with your app my friend!

Getting the node.js monitor-dashboard project to work externally

I'm trying to get the monitor-dashboard project to work but i get a page can't be found error when I try to use a browser externally.
http://lorenwest.github.io/monitor-dashboard/
Internally seems OK, I'm getting a HTTP/1.1 200 OK from http://localhost:4200 with the usual curl command.
I went in to node/node_modules/monitor-dashboard/config/, and changed default.js and external.js and changed all occurrences of allowExternalConnections to true.
I've also got node-monitor loaded in to my node project.
I'm running node server.js first and then npm start monitor-dashboard in another window.
port 4200 is open via iptables -L
Any ideas?
The setting you're looking for is:
export NODE_ENV=external

Resources