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

Cannot fetch pull request data #1085

Closed
alexanmtz opened this issue Apr 5, 2024 · 10 comments
Closed

Cannot fetch pull request data #1085

alexanmtz opened this issue Apr 5, 2024 · 10 comments
Labels
Milestone

Comments

@alexanmtz
Copy link
Member

TypeError: Cannot read properties of null (reading 'dataValues')
    at /app/modules/tasks/taskSolutionFetchData.js:54:54
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
taskSolutionFetchData error on controller Error: COULD_NOT_FETCH_PULL_REQUEST_DATA
    at /app/modules/tasks/taskSolutionFetchData.js:85:11
    at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:725:18)
    at _drainQueueStep (/app/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/app/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/app/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/app/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (node:internal/timers:473:21)
@Dheeraj4103
Copy link
Contributor

Dheeraj4103 commented Aug 23, 2024

Hey @alexanmtz can I work on this issue ?

@alexanmtz
Copy link
Member Author

Hey, @Dheeraj4103, yeah, feel free to get into this. it may be challenging to reproduce, but you can import an issue locally, go to the "Solve issue" and "Send Solution" tabs, paste one associated PR, and send a solution. You probably can't send the solution because you must be logged in with Github, but let me know if the error happens when fetching the data.

@Dheeraj4103
Copy link
Contributor

Ok, understood.
Thanks for helping

@Dheeraj4103
Copy link
Contributor

While recreating this issue i got this response.
image

@alexanmtz
Copy link
Member Author

Hey @Dheeraj4103 , you're having this response because you're not authenticated. Once you authenticate locally, you can copy the token from the request and pass to Postman as an authorization bearer token, and you can evaluate better.

But checking the line which is causing the error
https://github.com/worknenjoy/gitpay/blob/66a0473ca7560b99099aa7a898e134d9175e3bc8/modules/tasks/taskSolutionFetchData.js#L55C7-L55C9

You will see that maybe the assignment is null, and we need to handle that. I will do some tests here to investigate the best solution, but I think the verification for the issue close should not have this assignment verification. However, a current solution to avoid the error is to check the property conditionally.

@Dheeraj4103
Copy link
Contributor

Ok, I will work on it

Hey @Dheeraj4103 , you're having this response because you're not authenticated. Once you authenticate locally, you can copy the token from the request and pass to Postman as an authorization bearer token, and you can evaluate better.

But checking the line which is causing the error https://github.com/worknenjoy/gitpay/blob/66a0473ca7560b99099aa7a898e134d9175e3bc8/modules/tasks/taskSolutionFetchData.js#L55C7-L55C9

You will see that maybe the assignment is null, and we need to handle that. I will do some tests here to investigate the best solution, but I think the verification for the issue close should not have this assignment verification. However, a current solution to avoid the error is to check the property conditionally.

@Dheeraj4103
Copy link
Contributor

Hey @alexanmtz,
Can you help me to recreate this issue, maybe we could take a google meet, If that is okay with you ?

@alexanmtz
Copy link
Member Author

Hey @Dheeraj4103 let me go throught it to reproduce and I will get back to you soon

@Sajid-tech
Copy link

@alexanmtz If the issue is still open , I would like to contribute, ASSIGN me

@alexanmtz
Copy link
Member Author

Hey @Dheeraj4103 and @Sajid-tech, there's an issue on this flow that I have to work properly on it; please feel free to comment on any other issue you're interested in solving :)

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

No branches or pull requests

4 participants
@alexanmtz @Dheeraj4103 @Sajid-tech and others