Michal Srb
Michal Srb9mo ago

App is not displaying files

@Deleted User 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, *
No description
No description
No description
29 Replies
Michal Srb
Michal SrbOP9mo ago
Hey @Deleted User, 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.
Deleted User
Deleted User9mo ago
npx convex dev display same error; when comes to Your Files site after uploading files ,files do not appear/display on a frontend interface but on convex I can see that they have been added gh-repo https://github.com/timetothynk/hackdatfile currently i build/learn how to code trying make 3 working fully saas which I will offer for free with monetization of google ads. but this will come on time ;once I fix major issue here in code
Michal Srb
Michal SrbOP9mo ago
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.
Deleted User
Deleted User9mo ago
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. I have been trying for almost 4 hours to spot an issue and debug and still haven't figured it out. I wish to see if anyone could point me out a bit further where I should look. There is my repo above added.
lee
lee9mo ago
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?
No description
Deleted User
Deleted User9mo ago
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!
lee
lee9mo ago
i was getting that error until i hooked up the clerk webhook. Maybe you didn't fully set it up?
Deleted User
Deleted User9mo ago
i do have set, in your opinion which code files I should review or what should I do ?
lee
lee9mo ago
- 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
Deleted User
Deleted User9mo ago
im upto for a call and screen share all, steps (since Im still learning sometimes need helpful hand - for a suppport as a baby 😉
ballingt
ballingt9mo ago
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.
Deleted User
Deleted User9mo ago
Yes I will follow all steps.
Deleted User
Deleted User9mo ago
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)
No description
ballingt
ballingt9mo ago
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
Deleted User
Deleted User9mo ago
No description
ballingt
ballingt9mo ago
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.
Deleted User
Deleted User9mo ago
No description
ballingt
ballingt9mo ago
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.
Deleted User
Deleted User9mo ago
but this was like that/after following all step from tutorial video of Cody and then magically all stops working.
ballingt
ballingt9mo ago
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.
Deleted User
Deleted User9mo ago
No description
lee
lee9mo ago
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
Deleted User
Deleted User9mo ago
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.
Deleted User
Deleted User9mo ago
No description
No description
Deleted User
Deleted User9mo ago
both logs after deleting users/user
Deleted User
Deleted User9mo ago
okay, seem after cleaning all functions/readjusting them and so on finally started to work
No description
Deleted User
Deleted User9mo ago
thank you for your patience with me and assistance! Have a Blessed Day!
lee
lee9mo ago
i think this is what happens if you log in before setting up the webhook. Glad it worked!
Deleted User
Deleted User9mo ago
thank you! once again because I do have all the rest/most ready for presentation and registration as a Ltd. and am launching 3 free SaaS, because user feedback will be good to lead towards improvement before making chargable.  and I do love Convex; it's nice, clean, and lean, better than supabase.