with-labs / popspace

Comprehensive source for PopSpace, virtual spaces for everybody
GNU General Public License v2.0
278 stars 42 forks source link

Couple issues #18

Closed dillfrescott closed 10 months ago

dillfrescott commented 1 year ago

The notepad does not load it just spins forever. Also when I upload a file it displays as just the picture name and not the actual jpg file image

a-type commented 1 year ago

Is there any error output from any of the server processes in your container?

dillfrescott commented 1 year ago

Ah, I dont believe there was any errors of any sort. Id have to test it again but I don't remember seeing any

jaderms commented 1 year ago

I also experience both of these issues. The first one, where the spinner keeps spinning indefinitely, only occurs in Google Chrome. If I remove the widget and then restore it, it starts working. A page reload works too.

Regarding the second problem, I managed to solve it by modifying the file noodle-api/src/lib/files.js. I added 'async/await' to the metadata retrieval:

getFileMetadata: async (fileId) => {
  const base = await shared.db.prisma.fileUpload.findUnique({ where: { id: (fileId) } })

PR: #19

a-type commented 1 year ago

Sorry for not keeping up with this, but I've also been able to reproduce the notepad issue. Unfortunately the notepad is a particularly complicated widget under the hood so it may require some further intervention.

It's odd to me that your fix worked for images, since I've not had any trouble with my local testing, but you're right that that code is definitely broken.

jaderms commented 1 year ago

I believe I have managed to resolve the issue in the Notepad. It seems that the attempt to address the race condition wasn't fully implemented, which is why it wasn't working correctly. I have submitted my changes in PR #20.

dillfrescott commented 10 months ago

@jaderms Amazing!