Cannot use 'in' operator to search for 'url' in undefined

My team and I were creating a Solid based app for route management (deployed here https://arquisoft.github.io/viade_en2a/#/login and the github repository is https://github.com/Arquisoft/viade_en2a), we based our application on the solid app generator but there is a functionality that works on local but when deployed it does not work. On the app you can share routes with Solid friends and the friend can see the route when logged in, we implement this functionality using the Solid permissions but we don´t know why on gh-pages it does not work, the excepcion will be described below but we identified that it happens on storage.js.

Could you share which branch the code that’s live on GitHub Pages lives in? When I inspect your code in my browser, I see a bunch of code supposedly in notifications.component.js:

image

However, looking at that file in your repository, I can’t find that code.

(One thing that appears wrong is using useEffect without listing the referenced variables (e.g. webId, notifications) in the dependencies (which currently only lists unread).

If you open the console in your browser when running your app locally, are there no warnings?

The code is on the master branch, you dont see the code there because it is loaded from a react component that came with the generator, the code is here and it is loaded on line 21 of this file.

Ah, thanks - there’s multiple files with the same name, apparently.

It’s a bit hard to debug, but what I’m expecting is going wrong is that when you call notificationsFile, the parameter webId is undefined. I’m not sure what initNotifications does, but given that it’s an async function, I’m assuming that you’ll have to wait for it to finish before you can call notificationsFile. Which, again, is likely being called with undefined parameters.

What I’d recommend you to do is to first read React’s docs on hooks, and to maybe catch up on the relationship between async/await and Promises in Javascript. Then, take a look at the following suggested changes to the useEffect call, and try to understand why I made those changes. I have a strong suspicion that part of the cause of your problems might lie there, and you’ll probably spot a bunch of other instances of those problems in your code as well:

  useEffect(() => {
    if (!webId || !notifications) {
      return;
    }
    initNotifications().then(() => {
      notificationsFile(webId, notifications);
    });
    
  }, [webId, notifications]);

We already solved the problem, it was a problem with one of the libraries we used that changed the parameters of one of its functions. Thanks for your help regardless.