Comments (7)
Hi, I think that happens because, the app isn't able to find environment variables. e.g. REACT_APP_WEBSOCKET_API_URL
from orca.
HI thanks for the quick reply. May i ask why does this happen? For some reason i also got a string error with the env variable for mongodb link so i had to manually enter the string within mongo.connect() and it worked...so im assuming i have to do something similar for websocket api url?
from orca.
So how can i solve this please? Very new to javascript and react
from orca.
You need to learn what environment variables are and how to use them in Node.js ecosystem. After learning it, read repositories readme carefully and you'll be able to solve this issue.
from orca.
The program compiles successfully but now i get this error:
×
TypeError: Cannot read property 'getAuthUser' of undefined
App
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/frontend/src/components/App/App.js:119
116 |
117 |
118 |
119 |
| ^ 120 | {data.getAuthUser ? (
121 | <Route
122 | exact
View compiled
▼ 17 stack frames were expanded.
renderWithHooks
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:14803
updateFunctionComponent
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:17034
beginWork
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:18610
HTMLUnknownElement.callCallback
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:188
invokeGuardedCallbackDev
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:237
invokeGuardedCallback
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:292
beginWork$1
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:23203
performUnitOfWork
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:22157
workLoopSync
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:22130
performSyncWorkOnRoot
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:21756
(anonymous function)
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:11089
unstable_runWithPriority
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/scheduler/cjs/scheduler.development.js:653
runWithPriority$1
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:11039
flushSyncCallbackQueueImpl
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:11084
flushSyncCallbackQueue
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:11072
scheduleUpdateOnFiber
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:21199
dispatchAction
C:/Users/yanic/Downloads/create-social-network-master/create-social-network-master/node_modules/react-dom/cjs/react-dom.development.js:15660
▲ 17 stack frames were expanded.
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error. Click the 'X' or hit ESC to dismiss this message.
from orca.
In console of chrome developer tools it outputs this:
WebSocket connection to 'ws://localhost:4000/graphql' failed: WebSocket is closed before the connection is established.
SubscriptionClient.close @ client.ts:165
client.ts:545 WebSocket connection to 'ws://localhost:4000/graphql' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
SubscriptionClient.connect @ client.ts:545
:4000/graphql:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
apollo-client.js:53 networkError TypeError: Failed to fetch
App.js:119 Uncaught TypeError: Cannot read property 'getAuthUser' of undefined
at App (App.js:119)
at renderWithHooks (react-dom.development.js:14803)
at updateFunctionComponent (react-dom.development.js:17034)
at beginWork (react-dom.development.js:18610)
at HTMLUnknownElement.callCallback (react-dom.development.js:188)
at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
at invokeGuardedCallback (react-dom.development.js:292)
at beginWork$1 (react-dom.development.js:23203)
at performUnitOfWork (react-dom.development.js:22157)
at workLoopSync (react-dom.development.js:22130)
at performSyncWorkOnRoot (react-dom.development.js:21756)
at react-dom.development.js:11089
at unstable_runWithPriority (scheduler.development.js:653)
at runWithPriority$1 (react-dom.development.js:11039)
at flushSyncCallbackQueueImpl (react-dom.development.js:11084)
at flushSyncCallbackQueue (react-dom.development.js:11072)
at scheduleUpdateOnFiber (react-dom.development.js:21199)
at dispatchAction (react-dom.development.js:15660)
index.js:1 The above error occurred in the component:
in App (at src/index.js:32)
in StoreProvider (at src/index.js:31)
in ThemeProvider (at src/index.js:30)
in ApolloProvider (at src/index.js:29)
in ApolloProvider (at src/index.js:28)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
console. @ index.js:1
localhost/:1 Uncaught (in promise) TypeError: Cannot read property 'getAuthUser' of undefined
at App (App.js:119)
at renderWithHooks (react-dom.development.js:14803)
at updateFunctionComponent (react-dom.development.js:17034)
at beginWork (react-dom.development.js:18610)
at HTMLUnknownElement.callCallback (react-dom.development.js:188)
at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
at invokeGuardedCallback (react-dom.development.js:292)
at beginWork$1 (react-dom.development.js:23203)
at performUnitOfWork (react-dom.development.js:22157)
at workLoopSync (react-dom.development.js:22130)
at performSyncWorkOnRoot (react-dom.development.js:21756)
at react-dom.development.js:11089
at unstable_runWithPriority (scheduler.development.js:653)
at runWithPriority$1 (react-dom.development.js:11039)
at flushSyncCallbackQueueImpl (react-dom.development.js:11084)
at flushSyncCallbackQueue (react-dom.development.js:11072)
at scheduleUpdateOnFiber (react-dom.development.js:21199)
at dispatchAction (react-dom.development.js:15660)
client.ts:545 WebSocket connection to 'ws://localhost:4000/graphql' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
from orca.
This errors show up before the welcome page even loads
from orca.
Related Issues (20)
- Automatically close sidebar on a mobile phone when moving to another channel
- Display Post Create a component in the channels page for non-authenticated users
- Display new members in Right Sidebar
- Channel tap issue on mobile phones
- Automatically delete a post after deleting a channel
- Typescript Compile Error: 'typeof ObjectId' is not callable. HOT 1
- Make channels list sortable via drag and drop
- Social authentication
- Text cropping in the PostCard component on different resolutions. HOT 1
- Fix rendering of links in PostCard, Comment, and Message Chat components. HOT 4
- Laas setup HOT 1
- User model will not scale with embeded lists of references to followers HOT 6
- User mentions
- Text editor for post creation HOT 8
- comments, likes, posts, notifications and messages two way reference is not needed HOT 1
- Unhandled Runtime Error HOT 4
- There is an error deploying to HEROKU HOT 5
- Post with multi-images HOT 2
- Config CORS vercel/GCP HOT 2
- Property 'dehydratedState' does not exist on type '{}' deploying frontend to heroku
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orca.