"Urgent: Seeking Help to Run Outdated Code for Upcoming Project Presentation!"

Hello, we are currently developing a project that we need to present soon. The problem is that we can no longer run our code since the tutorial: Getting Started · Solid that we used to develop our project has become outdated recently. Do you know how we can run our code? What installations do we need to do? Here is a link to our GitLab repository all the file are in dev branch : Files · dev · AlyssaShep / TER - Espace personnel de données · GitLab

UPDATE :
I managed to run the code by using this git: GitHub - Otto-AA/solid-client-js-demo-app: Demo app copied from https://docs.inrupt.com/developer-tools/javascript/client-libraries/tutorial/getting-started/ and replacing the files with my own. However, I encountered the following error message:

image

1 Like

Hi Lulu

What do you mean with this?

And the error message means that document.querySelector("#btnCreate") returned null, thus for you no button with id “btnCreate” exists. Did you remove <button name="btnCreate" id="btnCreate">Create</button>? (note that I didn’t try this out, but from quickly looking through the source code it seems like it should exist if you just copied the files from the git repository).

Thanks for your answer, i found the problem.

But now when i try to upload a file on my pod i got this error message :
Upload: FAIL https://*******.solidcommunity.net/public/instagram/ads_and_topics/posts_viewed.json, Error: Error: Web error: 413 (Payload Too Large) on PUT of https://*****.solidcommunity.net/public/instagram/ads_and_topics/posts_viewed.json

but the file i tried to upload isnt that big, it’s something like 150 ko so i dont really understand… maybe you know why ?

You likely exceeded the total storage space (which is around 24MB per user on solidcommunity.net). You could try to remove some other files and then try it again.

Also a debugging tip: If you get such an error, often the error text is also useful. You can see it in the network tab of your browser developer tools. In this case it was likely “User has exceeded their storage quota” which is pretty self-explanatory :slight_smile:

Ok thanks for your answer. Do you know on which one you can store the most ? is that pod.inrupt ? or another one ?

And i have another question, i am now trying to create a container on my pod. I’m logged but i still have the issue :

  1. `Error creating container: Error: Creating the empty Container at [https://***************.solidcommunity.net/public/] failed: [401] [Unauthenticated] Not Authenticated.

You might want to look at Common Error Codes and Causes — Inrupt JavaScript Client Libraries.

it’s already done, but i’m still stuck. I dont find why i can upload file on my pod, read all the stuff i have but not create a container…

Here is my code : solid/src/index.js · oce · AlyssaShep / TER - Espace personnel de données · GitLab

Maybe you can see if i’ve done a mistake.

That page says:

If the user is logged in but still receives this error, you might not have passed the session’s fetch() function as an option to the function sending the request.

I see a call to createContainerAt that’s passing in fetchFunc, which appears to be some other function than session.fetch. I’m not sure what it’s supposed to do, but I imagine it’s not the fetch function that is linked to the user’s authenticated session?

i’ve already tried to do a session.fetch but the issue is still the same so i’ve tried different thing to solve the problem but even with the session.fetch it still doesn’t work.

I’ve looked in my pod and the authorization are all checked so the issue don’t come from there.

i’ve tried to pass { fetch: session.fetch } and {fetch : fetch}

And the user is signed in, and other calls using session.fetch do work? Can you create the Container using https://penny.vincenttunru.com if you connect to your Pod, just to rule out any permission issues?

Has you can see i created test without any issue using this.

Yes the user is signed in and all the other calls to session.fetch work very well.


Has you can see when i run my code there is no issue when i want to see all the files i got on my pod.

But when i tried to upload a file and so use the function createContainerAt :

Well, in the code that I can currently see, I’m fairly sure that fetchFunc is the problem. If you can change it to session.fetch and then share the code that still isn’t working, that might help someone debug.

It could also be helpful if you could clean up the code, to remove things you tried but did not work. For example, besides fetchFunc, there is a bunch of commented-out code, and an unused getSession function. All those make it harder to find where the issue might be - both for us, and for yourself.

1 Like

Well i’ve found that it’s a token issues. I don’t know how, and why, but it’s fixed. It seems to be related to the cache.

Thanks for your help and your answer.

2 Likes

For anyone else that might see this (sorry for the late reply) I have raised a PR to update the tutorial to the latest Parcel bundler - Update 2020-11-06-00_first-app.md and package files to remove deprecated parcel-bundler package by PSFW · Pull Request #786 · solid/solidproject.org · GitHub

This should have everything you need to get the tutorial running with the latest Parcel version