GithubHelp home page GithubHelp logo

dimimikadze / orca Goto Github PK

View Code? Open in Web Editor NEW
1.2K 52.0 293.0 886 KB

Build modern community apps with React and Node.

Home Page: https://dimimikadze.github.io/orca-docs

License: MIT License

JavaScript 3.07% Shell 0.07% TypeScript 96.85%
nodejs react javacript typescript community mongodb social-network orca jamstack customer-engagement

orca's People

Contributors

dependabot[bot] avatar dimimikadze avatar exbu avatar gtsp233 avatar itsmais avatar rajendrasinhparmar avatar tomkochievi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

orca's Issues

Implement reusable Avatar component

Since we are using User's avatar in multiple components (Header, Sidebar, CreatePost, MessageUsers, SearchResult) lets create reusable Avatar component in components folder and use it in all above mentioned components.

We should be able to change avatars size via size prop, which by default should be 30.

For reference see how it's implemented in Header component: ImageContainer and Image.

PR should be created against implement-private-messages branch, not master.

It is a sub task of: #21

The demo is down?

Describe the bug

Screenshot from 2020-02-02 10-13-20

System

Browser version: Chromium Version 79.0.3945.79 (Official Build) Built on Ubuntu
Operating system: running on Ubuntu 18.04 (64-bit)

Additional context

I have an account previously created

Implement message notifications

Let's add message icon near to notifications icon in Header component, that will show count of people that has sent us a message, for example if two users has sent 20 messages, we should show 2 in there, in exactly same styling as in notifications.

Clicking on that icon, should open a dropdown that will contain following list. {User} has sent you a message, after clicking on that item we should be redirected to that specific messages page.

After redirecting to that page that message should be marked as read and should be removed from messages notifications.

This functionality should be real time using GraphQL subscriptions.

PR should be created against implement-private-messages branch, not master.

It is a sub task of: #21

The shared URL for Post is not loading the post instead it is showing "Page Not Found" -- Graphql endpoint URL not generating

Describe the bug

The shared URL for Post is not loading the post instead it is showing "Page Not Found"
Post loads/opens when we click user profile -> Post but doesn't open the same post when accessed using shared Post URL
I see that graphql URL endpoint is not generated or not used when we open the copied/shared post link.

System

Browser version: Chrome (latest Version)
Node.js version: 12.18.2
NPM or Yarn version: - 6.14.5
Operating system: Windows 10

Steps to reproduce

  1. Generated the link in the Post's copy Link option
  2. Then tried opening the link in a new tab in the same browser / same tab
  3. "Page Not found" -- gives redirect link to my home page

Expected behavior

Load / Open the post with this request URL ->https://shielded-lake-75128.herokuapp.com/graphql
(This should be the expected URL when we open Post -- This is opening in the Application level)
This works when we click user profile -> Post but doesn't open the same post when accessed using shared Post URL

Actual behavior

Loads error page.....with this request URL - https://amazing-shannon-5a05fb.netlify.app/post/5f1d9e1d76e8590004984515
(Found it in inspect Network Tab)

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)
error screenshot 1
error screenshot 2

Start message from scratch with user.

Describe the bug
When start messaging with user sometimes gives error.
It happens only on localhost.

System

Node.js version: v12.3.1
NPM or Yarn version: Yarn 1.16.0
Operating system: Windows OS

Steps to reproduce
(Write your steps here:)

  1. Go to user profile.
  2. Click Message button.
  3. Write new message and send.
  4. Reload message page.

Expected behavior

(Write what you thought would happen.)

Actual behavior

message-bug

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Additional context

Add any other context about the problem here.

Program works locally only

Hi I am facing another issue. The app now works locallywith no problem using the address http://localhost:3000 but when i tryto access it on another device using the server address http://192.168.0.102:3000 i get the folowing error:

×
TypeError: Cannot read property 'getAuthUser' of undefined
App
C:/Users/yanic/Downloads/New folder/my-network/frontend/src/components/App/App.js:119
116 |
117 |
118 |

119 |
| ^ 120 | {data.getAuthUser ? (
121 | <Route
122 | exact
View compiled
renderWithHooks
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:14797
14794 | ReactCurrentDispatcher.current = HooksDispatcherOnMountInDEV;
14795 | }
14796 | }
14797 | var children = Component(props, secondArg); // Check if there was a render phase update
| ^ 14798 |
14799 | if (workInProgress.expirationTime === renderExpirationTime) {
14800 | // Keep rendering in a loop for as long as render phase updates continue to
View compiled
updateFunctionComponent
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:16976
16973 | {
16974 | ReactCurrentOwner$1.current = workInProgress;
16975 | setIsRendering(true);
16976 | nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);
| ^ 16977 |
16978 | if (workInProgress.mode & StrictMode) {
16979 | // Only double-render components with Hooks
View compiled
beginWork
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:18503
18500 | var _Component = workInProgress.type;
18501 | var unresolvedProps = workInProgress.pendingProps;
18502 | var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);
18503 | return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderExpirationTime);
| ^ 18504 | }
18505 |
18506 | case ClassComponent:
View compiled
HTMLUnknownElement.callCallback
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:189
186 | window.event = windowEvent;
187 | }
188 |
189 | func.apply(context, funcArgs);
| ^ 190 | didError = false;
191 | } // Create a global error event handler. We use this to capture the value
192 | // that was thrown. It's possible that this error handler will fire more
View compiled
invokeGuardedCallbackDev
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:238
235 | // errors, it will trigger our global error handler.
236 |
237 | evt.initEvent(evtType, false, false);
238 | fakeNode.dispatchEvent(evt);
| ^ 239 |
240 | if (windowEventDescriptor) {
241 | Object.defineProperty(window, 'event', windowEventDescriptor);
View compiled
invokeGuardedCallback
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:291
288 | function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
289 | hasError = false;
290 | caughtError = null;
291 | invokeGuardedCallbackImpl$1.apply(reporter, arguments);
| ^ 292 | }
293 | /**
294 | * Same as invokeGuardedCallback, but instead of returning an error, it stores
View compiled
beginWork$1
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:23055
23052 | } // Run beginWork again.
23053 |
23054 |
23055 | invokeGuardedCallback(null, beginWork, null, current, unitOfWork, expirationTime);
| ^ 23056 |
23057 | if (hasCaughtError()) {
23058 | var replayError = clearCaughtError(); // invokeGuardedCallback sometimes sets an expando _suppressLogging.
View compiled
performUnitOfWork
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:22022
22019 | next = beginWork$1(current, unitOfWork, renderExpirationTime$1);
22020 | stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
22021 | } else {
22022 | next = beginWork$1(current, unitOfWork, renderExpirationTime$1);
| ^ 22023 | }
22024 |
22025 | resetCurrentFiber();
View compiled
workLoopSync
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:21995
21992 | function workLoopSync() {
21993 | // Already timed out, so perform work without checking if we need to yield.
21994 | while (workInProgress !== null) {
21995 | workInProgress = performUnitOfWork(workInProgress);
| ^ 21996 | }
21997 | }
21998 | /** @noinline */
View compiled
performSyncWorkOnRoot
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:21613
21610 |
21611 | do {
21612 | try {
21613 | workLoopSync();
| ^ 21614 | break;
21615 | } catch (thrownValue) {
21616 | handleError(root, thrownValue);
View compiled
(anonymous function)
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:11131
11128 | var callback = queue[i];
11129 |
11130 | do {
11131 | callback = callback(_isSync);
| ^ 11132 | } while (callback !== null);
11133 | }
11134 | });
View compiled
unstable_runWithPriority
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/scheduler/cjs/scheduler.development.js:659
656 | currentPriorityLevel = priorityLevel;
657 |
658 | try {
659 | return eventHandler();
| ^ 660 | } finally {
661 | currentPriorityLevel = previousPriorityLevel;
662 | }
View compiled
runWithPriority$1
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:11077
11074 |
11075 | function runWithPriority$1(reactPriorityLevel, fn) {
11076 | var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
11077 | return Scheduler_runWithPriority(priorityLevel, fn);
| ^ 11078 | }
11079 |
11080 | function scheduleCallback(reactPriorityLevel, callback, options) {
View compiled
flushSyncCallbackQueueImpl
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:11126
11123 | try {
11124 | var _isSync = true;
11125 | var queue = syncQueue;
11126 | runWithPriority$1(ImmediatePriority, function () {
| ^ 11127 | for (; i < queue.length; i++) {
11128 | var callback = queue[i];
11129 |
View compiled
flushSyncCallbackQueue
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:11114
11111 | Scheduler_cancelCallback(node);
11112 | }
11113 |
11114 | flushSyncCallbackQueueImpl();
| ^ 11115 | }
11116 |
11117 | function flushSyncCallbackQueueImpl() {
View compiled
scheduleUpdateOnFiber
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:21056
21053 | // scheduleCallbackForFiber to preserve the ability to schedule a callback
21054 | // without immediately flushing it. We only do this for user-initiated
21055 | // updates, to preserve historical behavior of legacy mode.
21056 | flushSyncCallbackQueue();
| ^ 21057 | }
21058 | }
21059 | } else {
View compiled
dispatchAction
C:/Users/yanic/Downloads/New folder/my-network/frontend/node_modules/react-dom/cjs/react-dom.development.js:15634
15631 | warnIfNotCurrentlyActingUpdatesInDev(fiber);
15632 | }
15633 | }
15634 | scheduleWork(fiber, expirationTime);
| ^ 15635 | }
15636 | }
15637 |
View compiled

Private messages

any plan to implement private message feature?
it would be nice to allow users to exchange some whispers. 😄

The application does not load in the Firefox browser

Describe the bug

  • Today I tried the demo in firefox and I get the following error: TypeError: "c is undefined"
  • I made a copy to test it locally and it gave me the following error: TypeError: "data is undefined"
    (Write your answer here.)

System

Browser version:
Node.js version:
NPM or Yarn version:
Operating system:

Steps to reproduce
(Write your steps here:)

Expected behavior

(Write what you thought would happen.)

Actual behavior

(Write what happened. Please add screenshots!)

Reproducible demo
TypeError: c is undefined
(Paste the link to an example project and exact instructions to reproduce the issue.)

Additional context

Add any other context about the problem here.

The app doesn't work.

Everything works fine in the beginning as you can see in the picture

Skjermbilde (116)

But it doesn't work in the web browser
Skjermbilde (115)

Node.js version: 12.13.0
NPM or Yarn version: 6.14.2

Add Image navigation

Would be nice if you could click the right (or left) side of the picture and it would take you to the previous (or next) picture.

Even better, if you could use the arrow keys on the keyboard for it.

SharedScreenshot

Playground => Server cannot be reached

Describe the bug
Dev mode:
App works but a playground server can't be reached.

FRONTEND LOG:
[1] Note that the development build is not optimized.
[1] To create a production build, use npm run build.
[1]
[0] (node:4386) UnhandledPromiseRejectionWarning: JsonWebTokenError: jwt must be provided
[0] at Proxy.module.exports (/../api/node_modules/jsonwebtoken/verify.js:53:17)
[0] at /../api/utils/apollo-server.js:17:32
[0] at new Promise ()
[0] at checkAuthorization (/../api/utils/apollo-server.js:16:10)
[0] at ApolloServer.context (/../api/utils/apollo-server.js:45:28)
[0] at ApolloServer. (/..api/node_modules/apollo-server-core/dist/ApolloServer.js:450:38)
[0] at Generator.next ()
[0] at fulfilled (/../api/node_modules/apollo-server-core/dist/ApolloServer.js:5:58)
[0] at processTicksAndRejections (internal/process/task_queues.js:94:5)
[0] (node:4386) 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(). (rejection id: 3)
[0] (node:4386) UnhandledPromiseRejectionWarning: JsonWebTokenError: jwt must be provided
[0] at Proxy.module.exports (/Users/jarek/Projects/psyh/api/node_modules/jsonwebtoken/verify.js:53:17)
[0] at /Users/jarek/Projects/psyh/api/utils/apollo-server.js:17:32
[0] at new Promise ()
[0] at checkAuthorization (/Users/jarek/Projects/psyh/api/utils/apollo-server.js:16:10)
[0] at ApolloServer.context (/Users/jarek/Projects/psyh/api/utils/apollo-server.js:45:28)
[0] at ApolloServer. (/Users/jarek/Projects/psyh/api/node_modules/apollo-server-core/dist/ApolloServer.js:450:38)
[0] at Generator.next ()
[0] at fulfilled (/Users/jarek/Projects/psyh/api/node_modules/apollo-server-core/dist/ApolloServer.js:5:58)
[0] at processTicksAndRejections (internal/process/task_queues.js:94:5)
[0] (node:4386) 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(). (rejection id: 4)
[0] (node:4386) UnhandledPromiseRejectionWarning: JsonWebTokenError: jwt must be provided
[0] at Proxy.module.exports (/Users/jarek/Projects/psyh/api/node_modules/jsonwebtoken/verify.js:53:17)
[0] at /Users/jarek/Projects/psyh/api/utils/apollo-server.js:17:32
[0] at new Promise ()
[0] at checkAuthorization (/../api/utils/apollo-server.js:16:10)
[0] at ApolloServer.context (/../api/utils/apollo-server.js:45:28)
[0] at ApolloServer. (/../api/node_modules/apollo-server-core/dist/ApolloServer.js:450:38)
[0] at Generator.next ()
[0] at fulfilled (/../api/node_modules/apollo-server-core/dist/ApolloServer.js:5:58)
[0] at processTicksAndRejections (internal/process/task_queues.js:94:5)
[0] (node:4386) 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(). (rejection id: 5)

System
Browser version: 80.0.3987.149 (Official Build) (64-bit)
Node.js version: v12.14.1
NPM or Yarn version: 6.14.3
Operating system:
Version 80.0.3987.149 (Official Build) (64-bit)

Steps to reproduce

  1. npx create-social-network myapp
  2. npm start from root folder
  3. open 'http://localhost:4000/graphql' in browser

Expected behavior
connect to graphql playground

(either PORT or async function with wrong syntax)

Actual behavior
PLAYGROUND LOG:
"error": "Failed to fetch schema. Please check your connection"

Failed to load resource: net::ERR_EMPTY_RESPONSE
TypeError: Failed to fetch

Will reproduce it later

Update CLI

  • Remove husky lint-staged and prettier from devDependencies and also it's configuration from package.json file
  • Remove format script from package.json
  • Remove .prettierrc file

Cannot access GraphQL Playground

Describe the bug

When trying to access GraphQL playground with the address http://localhost:4000/graphql, it returns the following error :

[0] (node:2688) UnhandledPromiseRejectionWarning: JsonWebTokenError: jwt must be provided
[0] at Proxy.module.exports (/Users/[...]/node_modules/jsonwebtoken/verify.js:53:17)
[0] at /Users/[...]/api/utils/apollo-server.js:17:32

[...] (I will put the full error at the end)

System

Browser version: Chrome Version 79.0.3945.88
Node.js version: v12.4.0
NPM or Yarn version: yarn version v1.15.2
Operating system: Mac OS Mojave 10.14.6

Steps to reproduce

  1. create application using npx
  2. yarn start the application (or just the API, the error remains de the same)
  3. access http://localhost:4000/graphql
  4. the error appears in the console, either with demo MONGO_URL or personal one, ( the same with demo Cloudinary information and mail provider or personal on), and beeing loged with a user in the application before accessing the adress or not

Expected behavior

Access to GraphQL playground

Actual behavior

  1. The browser lunches GraphQl playground, but the following message appears :
    {
    "error": "Failed to fetch schema. Please check your connection"
    }

with the following text next to the address :

"Server cannot be reached"

Additional context

Full console error :

[0] (node:2750) UnhandledPromiseRejectionWarning: JsonWebTokenError: jwt must be provided
[0] at Proxy.module.exports (/Users/[...]/node_modules/jsonwebtoken/verify.js:53:17)
[0] at /Users/[...]/api/utils/apollo-server.js:17:32
[0] at new Promise ()
[0] at checkAuthorization (/Users/[...]/api/utils/apollo-server.js:16:10)
[0] at ApolloServer.context (/Users/[...]/api/utils/apollo-server.js:45:28)
[0] at ApolloServer. (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:442:38)
[0] at Generator.next ()
[0] at fulfilled (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:5:58)
[0] at processTicksAndRejections (internal/process/task_queues.js:89:5)
[0] (node:2750) 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(). (rejection id: 2)
[0] (node:2750) UnhandledPromiseRejectionWarning: JsonWebTokenError: jwt must be provided
[0] at Proxy.module.exports (/Users/[...]/node_modules/jsonwebtoken/verify.js:53:17)
[0] at /Users/[...]/pivotty/api/utils/apollo-server.js:17:32
[0] at new Promise ()
[0] at checkAuthorization (/Users/[...]/pivotty/api/utils/apollo-server.js:16:10)
[0] at ApolloServer.context (/Users/[...]/api/utils/apollo-server.js:45:28)
[0] at ApolloServer. (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:442:38)
[0] at Generator.next ()
[0] at fulfilled (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:5:58)
[0] at processTicksAndRejections (internal/process/task_queues.js:89:5)
[0] (node:2750) 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(). (rejection id: 3)
[0] (node:2750) UnhandledPromiseRejectionWarning: JsonWebTokenError: jwt must be provided
[0] at Proxy.module.exports (/Users/[...]/node_modules/jsonwebtoken/verify.js:53:17)
[0] at /Users/[...]/api/utils/apollo-server.js:17:32
[0] at new Promise ()
[0] at checkAuthorization (/Users/[...]/api/utils/apollo-server.js:16:10)
[0] at ApolloServer.context (/Users/[...]/api/utils/apollo-server.js:45:28)
[0] at ApolloServer. (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:442:38)
[0] at Generator.next ()
[0] at fulfilled (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:5:58)
[0] at processTicksAndRejections (internal/process/task_queues.js:89:5)
[0] (node:2750) 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(). (rejection id: 4)
[0] (node:2750) UnhandledPromiseRejectionWarning: JsonWebTokenError: jwt must be provided
[0] at Proxy.module.exports (/Users/[...]/node_modules/jsonwebtoken/verify.js:53:17)
[0] at /Users/[...]/api/utils/apollo-server.js:17:32
[0] at new Promise ()
[0] at checkAuthorization (/Users/[...]/api/utils/apollo-server.js:16:10)
[0] at ApolloServer.context (/Users/[...]/api/utils/apollo-server.js:45:28)
[0] at ApolloServer. (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:442:38)
[0] at Generator.next ()
[0] at fulfilled (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:5:58)
[0] at processTicksAndRejections (internal/process/task_queues.js:89:5)
[0] (node:2750) 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(). (rejection id: 5)
[0] (node:2750) UnhandledPromiseRejectionWarning: JsonWebTokenError: jwt must be provided
[0] at Proxy.module.exports (/Users/[...]/node_modules/jsonwebtoken/verify.js:53:17)
[0] at /Users/[...]/api/utils/apollo-server.js:17:32
[0] at new Promise ()
[0] at checkAuthorization (/Users/[...]/api/utils/apollo-server.js:16:10)
[0] at ApolloServer.context (/Users/[...]/api/utils/apollo-server.js:45:28)
[0] at ApolloServer. (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:442:38)
[0] at Generator.next ()
[0] at fulfilled (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:5:58)
[0] at processTicksAndRejections (internal/process/task_queues.js:89:5)
[0] (node:2750) 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(). (rejection id: 6)
[0] (node:2750) UnhandledPromiseRejectionWarning: JsonWebTokenError: jwt must be provided
[0] at Proxy.module.exports (/Users/[...]/node_modules/jsonwebtoken/verify.js:53:17)
[0] at /Users/[...]/api/utils/apollo-server.js:17:32
[0] at new Promise ()
[0] at checkAuthorization (/Users/[...]/api/utils/apollo-server.js:16:10)
[0] at ApolloServer.context (/Users/[...]/api/utils/apollo-server.js:45:28)
[0] at ApolloServer. (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:442:38)
[0] at Generator.next ()
[0] at fulfilled (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:5:58)
[0] at processTicksAndRejections (internal/process/task_queues.js:89:5)
[0] (node:2750) 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(). (rejection id: 7)
[0] (node:2750) UnhandledPromiseRejectionWarning: JsonWebTokenError: jwt must be provided
[0] at Proxy.module.exports (/Users/[...]/node_modules/jsonwebtoken/verify.js:53:17)
[0] at /Users/[...]/api/utils/apollo-server.js:17:32
[0] at new Promise ()
[0] at checkAuthorization (/Users/[...]/api/utils/apollo-server.js:16:10)
[0] at ApolloServer.context (/Users/[...]/api/utils/apollo-server.js:45:28)
[0] at ApolloServer. (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:442:38)
[0] at Generator.next ()
[0] at fulfilled (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:5:58)
[0] at processTicksAndRejections (internal/process/task_queues.js:89:5)
[0] (node:2750) 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(). (rejection id: 8)
[0] (node:2750) UnhandledPromiseRejectionWarning: JsonWebTokenError: jwt must be provided
[0] at Proxy.module.exports (/Users/[...]/node_modules/jsonwebtoken/verify.js:53:17)
[0] at /Users/[...]/api/utils/apollo-server.js:17:32
[0] at new Promise ()
[0] at checkAuthorization (/Users/[...]/api/utils/apollo-server.js:16:10)
[0] at ApolloServer.context (/Users/[...]/api/utils/apollo-server.js:45:28)
[0] at ApolloServer. (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:442:38)
[0] at Generator.next ()
[0] at fulfilled (/Users/[...]/node_modules/apollo-server-core/dist/ApolloServer.js:5:58)
[0] at processTicksAndRejections (internal/process/task_queues.js:89:5)
[0] (node:2750) 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(). (rejection id: 9)

can not copy the post link from the post

Describe the bug
from the post, click the copy link, then apperas the error
(Write your answer here.)

System

Node.js version: 12.13.0
NPM or Yarn version:6.12.0
Operating system: centos7.6

Steps to reproduce
(Write your steps here:)

1.add a post,then share, finish the add process.
2.at the top-right of the new post ,click the ... button,then pop up a window
3. click the copy link, then the error appears

Expected behavior
get the link in the clipboard
(Write what you thought would happen.)

Actual behavior

(Write what happened. Please add screenshots!)
×
TypeError: Cannot read property 'writeText' of undefined
copyToClipboard
src/components/PostCard/PostCardOption.js:50
47 | const [{ auth }] = useStore();
48 |
49 | const copyToClipboard = () => {

50 | navigator.clipboard.writeText(
| ^ 51 | ${process.env.REACT_APP_FRONTEND_URL}${generatePath(Routes.POST, { 52 | id: postId, 53 | })}

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Additional context

Add any other context about the problem here.

I need help with replace ws error

Describe the bug
getting error
Screenshot 2020-03-19 at 13 18 10
on production site
(Write your answer here.)

System

Browser version:
Node.js version:
NPM or Yarn version:
Operating system:

Steps to reproduce
(Write your steps here:)

Expected behavior

(Write what you thought would happen.)

Actual behavior

(Write what happened. Please add screenshots!)

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Additional context

Add any other context about the problem here.

create groups

i like this project and encourage you to move foreword, but it will be a good idea if the user can create group and the group have admin ,moderator and editor to share private posts, admin and moderator can accept or decline request of the follower to follow the group, and admin can create or delete moderator role in the group.

Follow/Unfollowing users with posts can cause TypeError: _data$getUserPosts is undefined

Describe the bug

When going to new, non followed users profiles and following/unfollowing them in a row it can cause a TypeError: _data$getUserPosts is undefined error.

System

Node.js version: v12.12.0
NPM or Yarn version: yarn 1.19.1
Operating system: MAC OS

Steps to reproduce

  1. go to new users profile
  2. follow
  3. unfollow
  4. repeat until error

Expected behavior

would follow and unfollow, or x out clicking of button like when spamming the like button off and on current does.

Actual behavior

sometimes after just unfollowing after following, sometimes after about 4 times, it will bring this error.

Screen Shot 2019-11-08 at 4 08 13 PM

ProfilePosts/<
src/pages/Profile/ProfilePosts.js:51

  48 |   variables={variables}
  49 |   notifyOnNetworkStatusChange
  50 | >
> 51 |   {({ data, loading, fetchMore, networkStatus }) => {
     | ^  52 |     if (loading && networkStatus === 1) {
  53 |       return (
  54 |         <Skeleton```



**Reproducible demo**

localhost

**Additional context**

trying to stress test site functionality for issues with heavy interaction. 

Implement unread messages

We should show if user has unread messages in MessagesUsers component. Let's add blue dot near to user's full name (like it's on Messenger) if user has unread messages.

This functionality should be real time using GraphQL subscriptions.

While on mobile view, let's make user's image container background blue, if we have unread messages from them.

PR should be created against implement-private-messages branch, not master.

It is a sub task of: #21

Heroku Buildpack

Is your feature request related to a problem? Please describe.

This is not really a problem but it would be cool if there's a simpler way to host it.

Describe the solution you'd like

It would be nice to have a Heroku Buildpack button on the README.md that will start a Heroku Project containing create-social-network.

Secret error

Hii
I clone the code and run replace all the MongoDB and api key
But what is secret in .env
It gives me error data is not defined

Question

Question
Which technologies do you choose for making chat and notification feature?

Awesome example, Thanks

This is an awesome example I use as a reference for a new project I'm doing,
so I just wanted to stop by and say thanks.

App only works locally, it does not work externally

Describe the bug
The frontend only works on localhost, when I try to access it externally it returns an error. There is a similar issue that was raised here #56

System

Browser version: Google Chrome Version 84.0.4147.135 (Official Build) (64-bit)
Node.js version: v13.9.0
NPM version: 6.14.4
Operating system: macOS Catalina 10.15.5

Steps to reproduce

  1. git clone [email protected]:DimiMikadze/create-social-network.git social-network
  2. cd social-network && npm start
  3. Access app on http://localhost:3000/ confirm it works.
  4. Access app on http://192.168.1.253:3000/, confirm it doesn't work

Expected behavior

Expected the external link to render the home page like localhost

Screenshot 2020-08-31 at 20 39 48

Actual behavior
An error is displayed.

Screenshot 2020-08-31 at 20 38 17

Reproducible demo

  1. git clone [email protected]:ianchikwature/social-network.git

  2. cd social-network && npm start

  3. access link at http://192.168.1.253:3000/

Implement isUserOnline functionality in MessageChatHeading

Let's add green dot near to User's full name in MessageChatHeading if user is online, exactly like it's done already in user's Profile page.

For reference check ProfileInfo component, this functionality should be real time using GraphQL subscriptions and should use IS_USER_ONLINE_SUBSCRIPTION subscription.

Also let's make users image and full name clickable, so after clicking on it we can navigate to that specific users profile page.

PR should be created against implement-private-messages branch, not master.

It is a sub task of: #21

netlify.toml

Describe the bug

Using yarn create social-network my-network creates a netlify.toml with a publish = "frontend/build". Following the frontend deployment guide to netlify results in the netlify.toml overriding the build settings, which is desired. Unfortunately, it leads to this netlify error.
failed during stage 'building site': Deploy directory 'frontend/frontend/build' does not exist
Updating the netlify.toml to have a base = "frontend" and `publish="build"`` resolves the issue on netlify.

System

Node.js version: 11.11.0
NPM or Yarn version: Yarn 1.15.2
Operating system: Windows 10

Steps to reproduce
(Write your steps here:)

  1. yarn create social-network my-network
  2. push the entire repo to github
  3. link github repo to netlify
  4. deploy master branch of github repo via netlify

Expected behavior

React frontend is available after netlify deploy steps completed.

Actual behavior

Netlify fails to deploy the react application based on the netlify.toml
image

Reproducible demo

https://github.com/liester/test-social-network

Additional context

I have created a PR for the netlify.toml modification.

Heroku api Refused to load the image on production

Content Security Policy directive: "default-src 'none'". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback. Refused to load the image 'https://myapp.herokuapp.com/favicon.ico' because it violates the following.

Need help on how to deal with this I've tried many things thus deployment process is very slow if you don't mind please point me in the right direction. Thank you.

TypeError: Cannot read property 'replace' of undefined

Hi i get this error TypeError: Cannot read property 'replace' of undefined in this bit of code :

17 | // GraphQL WebSocket (subscriptions) URL.
18 | // If its url is not set in .env then it has same url, host and pathname
19 | const WEBSOCKET_API_URL = process.env.REACT_APP_WEBSOCKET_API_URL;

20 | const websocketApiUrl = WEBSOCKET_API_URL
21 | ? WEBSOCKET_API_URL
22 | : API_URL.replace('https://', 'ws://').replace('http://', 'ws://');

located under the directory frontend/src/index.js

heroku api deployment => CSP Favico.ico violation

Describe the bug
Cant start graphql on heroku due to csp favico.ico violation chrome log says.

System

Browser version:
Node.js version: 12.14.1
NPM or Yarn version:
Operating system:
MacOs
Steps to reproduce

  1. npx create-social-network app
  2. Frontend deploy (env)
  3. Api deploy (config vars added)

Expected behavior
Deploy on heroku.

Actual behavior
csp favico.ico violation chrome log says.

git push using: heroku master
Enumerating objects: 45, done.
Counting objects: 100% (45/45), done.
Delta compression using up to 4 threads
Compressing objects: 100% (42/42), done.
Writing objects: 100% (45/45), 56.70 KiB | 1.62 MiB/s, done.
Total 45 (delta 8), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote: NODE_VERBOSE=false
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): unspecified
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version 12.x...
remote: Downloading and installing node 12.16.1...
remote: Using default npm version: 6.13.4
remote:
remote: -----> Installing dependencies
remote: Installing node modules (package.json + package-lock)
remote:
remote: > [email protected] postinstall /tmp/build_f6be07d02cfceb315b10939000458718/node_modules/core-js
remote: > node -e "try{require('./postinstall')}catch(e){}"
remote:
remote:
remote: > @apollo/[email protected] postinstall /tmp/build_f6be07d02cfceb315b10939000458718/node_modules/@apollo/protobufjs
remote: > node scripts/postinstall
remote:
remote:
remote: > [email protected] postinstall /tmp/build_f6be07d02cfceb315b10939000458718/node_modules/nodemailer
remote: > node -e "try{require('./postinstall')}catch(e){}"
remote:
remote: === Nodemailer 6.4.6 ===
remote:
remote: Thank you for using Nodemailer for your email sending needs! While Nodemailer
remote: itself is mostly meant to be a SMTP client there are other related projects in
remote: the Nodemailer project as well.
remote:
remote: For example:
jarek@cichy test % heroku logs --tail
2020-03-30T12:18:54.356226+00:00 app[api]: Initial release by user myemail
2020-03-30T12:18:54.356226+00:00 app[api]: Release v1 created by user myemail
2020-03-30T12:18:54.464046+00:00 app[api]: Enable Logplex by user myemail
2020-03-30T12:18:54.464046+00:00 app[api]: Release v2 created by user myemail
2020-03-30T12:19:21.109111+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=createsocial.herokuapp.com request_id=9d713eb
a-76f1-42e1-aeb7-021403717bee fwd="80.49.170.60" dyno= connect= service= status=502 bytes= protocol=https
2020-03-30T12:19:21.414880+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=createsocial.herokuapp.com request
_id=71ed8701-4456-4932-9b45-da4f3bc97f52 fwd="80.49.170.60" dyno= connect= service= status=502 bytes= protocol=https
2020-03-30T12:27:21.243513+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=createsocial.herokuapp.com request_id=5af48ea
e-75f1-4c9f-b8b4-c16ed5db60db fwd="80.49.170.60" dyno= connect= service= status=502 bytes= protocol=https
2020-03-30T12:27:21.456860+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=createsocial.herokuapp.com request
_id=eb5bab21-2b18-4cea-af7a-c01480da0828 fwd="80.49.170.60" dyno= connect= service= status=502 bytes= protocol=https
2020-03-30T12:55:01.809213+00:00 app[api]: Release v3 created by user myemail
2020-03-30T12:55:01.809213+00:00 app[api]: Set API_PORT config vars by user myemail
2020-03-30T12:55:10.298948+00:00 app[api]: Set FRONTEND_URL config vars by user myemail
2020-03-30T12:55:10.298948+00:00 app[api]: Release v4 created by user myemail
2020-03-30T12:55:20.248639+00:00 app[api]: Release v5 created by user myemail
2020-03-30T12:55:20.248639+00:00 app[api]: Set MONGO_URL config vars by user myemail
2020-03-30T12:55:37.678803+00:00 app[api]: Release v6 created by user myemail
2020-03-30T12:55:37.678803+00:00 app[api]: Set SECRET config vars by user myemail
2020-03-30T12:55:44.424952+00:00 app[api]: Release v7 created by user myemail
2020-03-30T12:55:44.424952+00:00 app[api]: Set CLOUDINARY_CLOUD_NAME config vars by user myemail
2020-03-30T12:55:50.717433+00:00 app[api]: Set CLOUDINARY_API_KEY config vars by user myemail
2020-03-30T12:55:50.717433+00:00 app[api]: Release v8 created by user myemail
2020-03-30T12:55:57.027235+00:00 app[api]: Set CLOUDINARY_SECRET config vars by user myemail
2020-03-30T12:55:57.027235+00:00 app[api]: Release v9 created by user myemail
2020-03-30T12:56:11.596912+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=createsocial.herokuapp.com request_id=4c42171
d-61f8-4001-8c82-1b6b1f4b9e47 fwd="80.49.170.60" dyno= connect= service= status=502 bytes= protocol=https
2020-03-30T12:56:12.015008+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=createsocial.herokuapp.com request
_id=2a2abd92-1817-43a8-a6c2-86985ccabcc0 fwd="80.49.170.60" dyno= connect= service= status=502 bytes= protocol=https
2020-03-30T12:59:36.000000+00:00 app[api]: Build started by user myemail
2020-03-30T12:59:38.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/289f330a-7bf1-47ea-af2b-d5a72cb566e
f/activity/builds/792adc4d-ec7a-4e2a-954e-cbb82c1a1fa0
2020-03-30T13:00:06.000000+00:00 app[api]: Build started by user myemail
2020-03-30T13:00:07.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/289f330a-7bf1-47ea-af2b-d5a72cb566e
f/activity/builds/c82e09dc-b13e-48a3-9d59-04bd8fee7d63
2020-03-30T13:00:56.000000+00:00 app[api]: Build started by user myemail
2020-03-30T13:01:26.714631+00:00 app[api]: Deploy 880f6638 by user myemail
2020-03-30T13:01:26.731272+00:00 app[api]: Scaled to web@1:Free by user myemail
2020-03-30T13:01:26.714631+00:00 app[api]: Release v10 created by user myemail
2020-03-30T13:01:28.000000+00:00 app[api]: Build succeeded
2020-03-30T13:01:36.312170+00:00 heroku[web.1]: State changed from starting to up
2020-03-30T13:01:36.025266+00:00 app[web.1]: (node:4) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be remov
ed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2020-03-30T13:01:36.026424+00:00 app[web.1]: server ready at http://localhost:4598/graphql
2020-03-30T13:01:36.026507+00:00 app[web.1]: Subscriptions ready at ws://localhost:4598/graphql
2020-03-30T13:01:36.072552+00:00 app[web.1]: (node:4) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
2020-03-30T13:01:36.073498+00:00 app[web.1]: DB connected
2020-03-30T13:01:51.148383+00:00 heroku[router]: at=info method=GET path="/" host=createsocial.herokuapp.com request_id=5fc2ca82-ab20-4ee8-952a-0df567cb74ba fwd="80.49.170.60" dyno=web.1 connect=1ms service=15ms status=404 bytes=500 protocol=https

In addition here is step by step
API starts at 7:30
https://www.youtube.com/watch?v=tlKEo7XxivM

fix header UI

Describe the bug
Notification count needs fix. (padding or letter-space)
(Write your answer here.)

System

Node.js version:
NPM or Yarn version:
Operating system:

Steps to reproduce
(Write your steps here:)

Expected behavior

(Write what you thought would happen.)

Actual behavior

(Write what happened. Please add screenshots!)

Reproducible demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Additional context

Add any other context about the problem here.

Username restrictions

Hi,

I guess there should be a restriction on creating usernames like notifications, people, explore.

Security problem

Hi guys, nice work!

I found a problem that allows me to post with name of other people...

How the security layer works in resolvers?

Authenticated users can mutate entities on behalf of other users.

Describe the bug

Authenticated users can mutate entities on behalf of other users. Initially reported at #65.
To fix it, we need to check if the authenticated User's ID on the server matches the User's ID that is sending the request.

System

Browser version: Version 85.0.4183.102 (Official Build) (64-bit)
Node.js version: v14.10.0
NPM or Yarn version: yarn 1.22.5
Operating system: Linux. Ubuntu 20.04.1 LTS

Steps to reproduce

  1. Get the authentication token from the browser.
  2. Navigate to GraphQL playground, and send the mutation on behalf of other users.
  3. Screenshot from 2020-09-16 13-49-33

The list of the mutations that contains this bug:
Posts
create, delete
Comments
create, delete
Like
create, delete
Follow
create, delete
Notifications
create
Messages
create

Expected behavior
It shouldn't mutate an entity and send an error message instead.

unable to create template application

Describe the bug

Unable to create template using npx create-social-network my-network in macOS. Getting fatal: Unable to find remote helper for 'git+https' error.

(Write your answer here.)

System

Node.js version: v10.11.0
NPM or Yarn version: NPM 6.8.0
Operating system: Mac os 10.14.6 (18G103)

Steps to reproduce
(Write your steps here:)

  1. npx create-social-network my-network

Expected behavior

should be able to create template application my-network
Actual behavior

getting error fatal: Unable to find remote helper for 'git+https'

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.