#App is not displaying files

37 messages · Page 1 of 1 (latest)

pine heron
#

@shadow raft is asking:

Hey there, guys! As you can see in the attached pictures in a post on the help forum, I'm facing some major issues. I have been going through the whole code after spending 3 days building the app by following the steps provided with a complete explanation by Cody(on his YT).

There were some issues for me as well with some unreadable code lines. To correct or navigate to them for a correction, I have used a copy-paste style (I know it's bad, but I have done it and everything was later adjusted for my personal use).

Apart from those major issues, there are problems with files not being displayed or the canvas not loading up. I wonder if the implementation of Stripe payments will be smooth in such an app or if it will take some time. Also, after doing extra bits to launch the app, what would you recommend: Vercel or Netlify?

I appreciate your help! If you need my GitHub repository, please let me know, and feel free to add commits which will be accepted later."

additional information I have asked same question on Cody discord didn't heard much since, *

#

Hey @shadow raft, your post doesn't provide enough detail so that we can help you. Can you share what exactly is not working, what is your backend code and what is your frontend code? You can browse through this channel to see how others ask for help.

Also for the first screenshot, you probably want npm run dev or npx convex dev, NOT npx run convex.

shadow raft
#

currently i build/learn how to code

shadow raft
pine heron
#

Here's one way you can debug this: Start from the page: What does your HTML show? Then work your way from your React component, to the query call it makes, to the query implementation. If they are all correct, check the data in the database. Is it as you expect?

Use console.log along the way to figure out if values at runtime match what you expect.

shadow raft
# pine heron Here's one way you can debug this: Start from the page: What does your HTML show...

Thank you for your prompt response to me. It is hard to tell now since I have been learning for a month or two and slowly progressing due to other duties, and recently I spent 3 days bit by bit following all the steps with the video tutorial from Cody and Convex Docx and Clerk Docx, and it seems there is an issue that is causing me a headache because I can spot where the problem is.

I wish to get more hints because I want to learn from my mistakes and add notes to the code {/**/} to make it more readable in the future.

shadow raft
silent dove
#

i cloned your repo and set up clerk, and it seems to be working for me. can you describe the steps to reproduce the error you're seeing?

shadow raft
# silent dove i cloned your repo and set up clerk, and it seems to be working for me. can you ...

Strangely, for everyone I asked or cloned, my repo does not work for me.

I have just woken up, seen message cd myself to a folder type code . , then npx convex dev, and npm run dev come to site log in/with new account try to upload files - files going to convex back end but they are still not visible for me - I have tried on Edge, Firefox (both normal and developer edition), Brave, Chrome,chrome even Opera, and still nothing. Whenever I try to upload files, it gives me an error.

[CONVEX M(files:createFile)] [Request ID: 9234a7b32abbb437] Server Error
Uncaught ConvexError: you do not have access to this org
    at handler (../convex/files.ts:66:4)

I can see it after inspecting a page!

silent dove
#

i was getting that error until i hooked up the clerk webhook. Maybe you didn't fully set it up?

shadow raft
#

i do have set, in your opinion which code files I should review or what should I do ?

silent dove
#
  • check the url for the clerk webhook
  • check that the webhook has events enabled for users and organization memberships event
  • copy the clerk webhook secret into a convex env variable
  • copy the clerk domain into a convex env variable
  • in the clerk users page, delete existing users and then log into your app again to recreate them and send new webhook requests

The convex dashboard logs page should have information about any webhook failures, and the data page should show you the tokenIdentifier field

#

It would help debug if you could provide screenshots of your app's errors, convex env variables, and the clerk webhook setup

shadow raft
#

im upto for a call and screen share all, steps (since Im still learning sometimes need helpful hand - for a suppport as a baby 😉

amber kernel
#

Could you try following these steps? @Lee just took the time to clone your repo to confirm it works and suggest specific things for you to check.

shadow raft
#

I have followed all steps and:

now in convex dashboard - users after deleting despaired plus when I connect by new account do not create them with their id's

and issue keep pursuing :
[CONVEX M(files:createFile)] [Request ID: 5372866687f83d08] Server Error
Uncaught ConvexError: you do not have access to this org
at handler (../convex/files.ts:66:4)

amber kernel
#

Are you seeing the webhooks running at all in the convex logs?

The convex dashboard logs page should have information about any webhook failures, and the data page should show you the tokenIdentifier field

amber kernel
#

What does the logs pane look like?

#

The error you're showing here makes sense, it says that fileId should be a storage id but you've passed an empty string in the function runner here.

shadow raft
amber kernel
#

Do you see any HTTP endpoints errors in the logs if you scroll back? It sounds like you might not have the webhooks set up on the Clerk side.

shadow raft
amber kernel
#

What you're doing here would never work, you're running the files:createFile function with empty strings are arguments instead of the expected arguments.

silent dove
#

can you try doing this

  • in the clerk users page, delete existing users and then log into your app again to recreate them and send new webhook requests

and then show the logs page again to see the webhooks

shadow raft
#

im all set as I said all was working even being left like that while I coding then out of sudden stops displaying images and so on - while anyone who fork from me and set all works for them - thats make me go hmm.

#

both logs after deleting users/user

#

okay, seem after cleaning all functions/readjusting them and so on finally started to work

#

thank you for your patience with me and assistance!

#

Have a Blessed Day!

silent dove
#

i think this is what happens if you log in before setting up the webhook. Glad it worked!