How can I solve error occurred while proxying request? RedwoodJS - redwoodjs

I'm following RedwoodJS Tutorial - Getting Dynamic and there's a proxy error when requesting localhost:8910/posts
api | API listening on http://localhost:8911/
api | GraphQL endpoint at /graphql
api | 11:14:25 🌲 Server listening at http://[::]:8911
web | <e> [webpack-dev-server] [HPM] Error occurred while proxying request localhost:8910/graphql to http://[::1]:8911/ [ENETUNREACH] (https://nodejs.org/api/errors.html#errors_common_system_errors)

Ensure that your node and yarn versions match the prerequisites;
node: ">=14.19 <=16.x"
yarn: ">=1.15"

you can add RWJS_DEV_API_URL="http://localhost" to your environment variable; either by running RWJS_DEV_API_URL=“http://localhost” yarn rw dev or as a new line to your .env file

Related

React - 504 Gateway Timeout when proxying

I'm using http-proxy-middleware to proxy some requests.
I can proxy correct some APIs but I'm getting 504 in one of them.
I believe this has something to do with the network (corp laptop).
I've run all of these commands to make sure it's all set corretly. My password has the character . (the dot). I don't think it has anything to do with it.. but we never now. I've also tried the base64 just in case but got the same result.
npm config set registry http://registry.npmjs.org/
npm config set http-proxy http://username:password#ip:port
npm config set https-proxy http://username:password#ip:port
npm config set proxy http://username:password#ip:port
npm set strict-ssl false
I'm getting this in the console:
[HPM] Error occurred while proxying request localhost:3000/produXXXXXXXXXXXX to https://XXXXXXXX [ENOTFOUND] (https://nodejs.org/api/errors.html#errors_common_system_errors)
Just replaced with XXXX because it's a corp url.
It works perfectly from postman with the same proxy server auth.
Any advice?
Thanks!

firebase deployment issue with a react app

I'm trying to deploy my react app on firebase but i get this error:
Error: Failed to list Firebase projects. See firebase-debug.log for more info.
and in the firebase-debug.log file this shows:
[info] First, let's associate this project directory with a Firebase project.
[info] You can create multiple project aliases by running firebase use --add,
[info] but for now we'll just set up a default project.
[info]
[debug] [2021-03-20T19:18:31.200Z] > refreshing access token with scopes: []
[debug] [2021-03-20T19:18:31.202Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token
[debug] [2021-03-20T19:18:32.948Z] <<< HTTP RESPONSE 200 {"expires":"Mon, 01 Jan 1990 00:00:00
GMT","cache-control":"no-cache, no-store, max-age=0, must-revalidate","date":"Sat, 20 Mar 2021 19:18:28 GMT","pragma":"no-cache","content-type":"application/json; charset=utf-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","server":"scaffolding on HTTPServer2","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"","accept-ranges":"none","transfer-encoding":"chunked"}
[debug] [2021-03-20T19:18:33.023Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects pageSize=100
[debug] [2021-03-20T19:18:35.619Z] Failed to make request: invalid json response body at https://firebase.googleapis.com/v1beta1/projects?pageSize=100 reason: Unexpected token < in JSON at position 0
[debug] [2021-03-20T19:18:37.235Z] FirebaseError: Failed to make request: invalid json response body at https://firebase.googleapis.com/v1beta1/projects?pageSize=100 reason: Unexpected token < in JSON at position 0
at Client.request (C:\Users\john tucker\AppData\Roaming\npm\node_modules\firebase-tools\lib\apiv2.js:109:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[error]
[error] Error: Failed to list Firebase projects. See firebase-debug.log for more info.
I have already tried to logout and login and made sure that my app exists in the firebase console .
I also get this error when I type firebase init in the terminal :
(node:12720) UnhandledPromiseRejectionWarning: FirebaseError: Failed to make request to https://firebase-public.firebaseio.com/cli.json
at Client.doRequest (C:\Users\john tucker\AppData\Roaming\npm\node_modules\firebase-tools\lib\apiv2.js:211:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:12720) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:12720) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
You have to follow this steps to deploy your react app online with fire-base hosting :
npm run build => Run the following command to create a build directory with a production build of your app
npm install -g firebase-tools => To host your site with Firebase Hosting, you need the Firebase command-line tool (CLI). Run the following npm command to install the CLI on your system globally
firebase login => If you're not logged in, you'll be asked to enter the credentials for your google account.
firebase init => to initialize firebase in your react app
firebase deploy => Firebase will now run the deploying process and will give you a unique URL where your app is deployed

Apprtc - Websocket connection failed

I have installed and configured AppRTC, Collider, turn-server successfully.
But I am facing an issue of Websocket Error. Google chrome console errors are as follows:
Initializing; server= undefined.
apprtc.debug.js:5583 1.413: Initializing; room=undefined.
apprtc.debug.js:5583 5.209: Opening signaling channel.
apprtc.debug.js:5583 5.390: Got access to local media with mediaConstraints:
'{"audio":true,"video":{"optional":[{"minWidth":"1280"},{"minHeight":"720"}],"mandatory":{}}}'
apprtc.debug.js:5583 5.390: User has granted access to local media.
apprtc.debug.js:5583 5.391: Attaching local stream.
apprtc.debug.js:5092 WebSocket connection to 'wss://104.198.4.111:8089/ws' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
(anonymous) # apprtc.debug.js:5092
apprtc.debug.js:5583 5.578: WebSocket open error: WebSocket error.
apprtc.debug.js:5583 5.584: WebSocket register error: WebSocket error.
apprtc.debug.js:5583 5.636: Joined the room.
Following is the screenshot of WebSocket error, which I am facing
Collider and AppRTC are on Google VM instance and I have used my own turn-server which has been setup on AWS EC2 instance.
Please help me to resolve this issue.
Is there any setting in Google APP engine, where I deployed an APP?
Advanced help would be appreciated !

Zeppelin UI fails to load page with HTTP 500 error

I have a spark (version 2.2.0) cluster with 7 nodes and url spark://master:7077. I setup Apache Zeppelin 0.7.2 on the master node using the following configuration:
zeppelin.env.sh
export JAVA_HOME=/usr/local/java/jdk1.8.0_144
export SPARK_HOME=/usr/local/spark-2.2.0
export MASTER=spark://master:7077
export ZEPPELIN_PORT=8082
In zeppelin-site.xml I changed zeppelin.server.port from 8080 to 8082, also tried with other ports like 8090, 8091.
After starting zeppelin when I try to access web UI using master:8082 I got the following error but zeppelin status shows it is running:
HTTP ERROR: 500
Problem accessing /. Reason: javax.servlet.HttpServletRequest.isAsyncStarted()Z
I checked the logs and found that java.lang.NoSuchMethodError:javax.servlet.HttpServletRequest.isAsyncStarted()Z

Deploying a gradle script from Jenkins using the artifactory plugin

I'm trying to deploy a build from jenkins using the artifactory invocation of gradle plugin and get a an HTTP error 302, going through the log looks like there's a checksum problem that cannot be skipped:
13:35:41.463 [DEBUG] [org.jfrog.gradle.plugin.artifactory.task.BuildInfoBaseTask] Failed checksum deploy of checksum '8d80bb7f1bf2f0457baa3ad7379348c5ecbf2535' with statusCode: 302
13:35:41.466 [DEBUG] [org.apache.http.impl.conn.SingleClientConnManager] Get connection for route HttpRoute[{}->http://artifactory.edegem.eu.thmulti.com]
....
13:35:41.470 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnectionOperator] Connecting
13:35:41.503 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Receiving response: HTTP/1.1 302 Found
Any clue?
Thanks a lot.
302 is a status code for redirects, which means that your Artifactory is not located at 'http://artifactory.edegem.eu.thmulti.com' but in some other location. Browser follows the redirect to the new place (that's the reason you can browse Artifactory under this URL), but Artifactory networking is not. Please verify the 'real' location of Artifactory and point your Jenkins plugin to it.

Resources