PeWu / topola-viewer

Topola Genealogy Viewer – interactive genealogy visualization
https://pewu.github.io/topola-viewer
Apache License 2.0
221 stars 56 forks source link

Failed to fetch #130

Open Czajkor opened 1 year ago

Czajkor commented 1 year ago

While opening direct link to gedcom file: https://pewu.github.io/topola-viewer/#/view?url=https://drive.google.com/file/ <<< Link to File >>>/view?usp=sharing i got "Error to fetch" when it worked in a past. The same goes for wikitree IDs, including examples: Wojtyla-13, Skłodowska-2

Czajkor commented 1 year ago

After opening https://topola-cors-server.up.railway.app/ there is a message:

Nothing Here, Yet

This domain is available to use

BarrySilic commented 1 year ago

I have the same problem. Loading from URL is not working. Below if my URL https://pewu.github.io/topola-viewer/?fbclid=IwAR1b5BGAzNsRkPUBgNCpnxBs5sHEbbnrvIS276z2OW5oeJz84fx1GV_CzKU#/view?gen=0&indi=I1&url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1JIJvHwk2pupi6_5n7gJE13UK6vHG_eQQ%2Fview%3Fusp%3Dsharing

PeWu commented 1 year ago

Related: #123

Moving from Heroku to Railway doesn't seem to be sustainable. The Railway app is back up but the free Railway credits will run out again soon making the service unavailable.

I'll leave this issue open until I find a long-term solution

BattouSaeen commented 1 year ago

@BarrySillic I can open your link, but for some reason no matter where I upload my file (drive, mega, etc.), I always get a "failed to load file, e.pointer is undefined" error.

dima-ser commented 1 year ago

Same issue here, can't load from URL.

tasker25 commented 1 year ago

After the initial problem it worked for a time but is now reporting the same error. I hope you can find a solution since I embed the viewer in my website and this only works if I can load the gedcom from a url.

dima-ser commented 1 year ago

It seems to have broken recently, even the demo Shakespeare tree is not loading: https://pewu.github.io/topola-viewer/#/view?url=https%3A%2F%2Fwebtreeprint.com%2Ftp_downloader.php%3Fpath%3Dfamous_gedcoms%2Fshakespeare.ged

How to bypass the whole CORS issue? If I host this on my own server on the same domain where the GEDCOM file is linked, will that avoid the CORS issue? If so, it would be nice to have a Docker container of this so I can spin it up.

PSkeberdis commented 1 year ago

Still broken???

Continue to get the "Failed to load file, Failed to fetch" message for linking to URL on my web server that previously worked. (Using Synology Web Station)

Tried the Googe Drive method recommended (Hosting a GEDCOM file), and can download the file using the Google Drive link, but cannot fetch with Topola Viewer.

Also tried the &embedded=true option, which appears to work (removes options to load files).

Also tried the &handleCors=false option, which has no apparent effect.

The "Select WikiTree ID" examples in the Topola Viewer also do not work.

"Load from URL" option displays a message "Data from the URL will be loaded through [topola-cors-server.up.railway.app] to avoid CORS issues.", and selecting the 'railway app' link display an error "Application failed to respond".

Anybody looking at how to fix this? Possibly roll-back to when it worked?

tasker25 commented 1 year ago

It is still broken. I use the &embedded=true option which embeds the topola page in my own website. The topola page used to fetch the gedcom from my own website and then display it in my website, but since January there has been the same 'Failed to Fetch' error. My understanding is that I could get round this by running the topola code on my own server, but I am not enough of a programmer to achieve this. I would very much appreciate if a solution could be found. It was such a neat solution before.

dima-ser commented 1 year ago

It is still broken. I use the &embedded=true option which embeds the topola page in my own website. The topola page used to fetch the gedcom from my own website and then display it in my website, but since January there has been the same 'Failed to Fetch' error. My understanding is that I could get round this by running the topola code on my own server, but I am not enough of a programmer to achieve this. I would very much appreciate if a solution could be found. It was such a neat solution before.

See this thread: https://github.com/PeWu/topola-viewer/issues/144 (specifically, this comment: https://github.com/PeWu/topola-viewer/issues/144#issuecomment-1426728638 ) There is a link to a self-hosted version that you can host on your own web server and resolve this issue. Any basic web server will do (nginx, apache, etc).

tasker25 commented 1 year ago

Thank you for the link to the self-hosted version which I may experiment with. However, trying again today the gedcom is being fetched correctly. I notice the Shakespeare example is also working again. Hopefully a permanent solution has been found.

PeWu commented 1 year ago

I deployed the cors-anywhere proxy on a new server. I hope this time it's going to work for some time.

BattouSaeen commented 1 year ago

@PeWu forgive me for opening this after closing, but I still can't open with a URL. If I use a google drive link, it says forbidden (the link is public, not invite-only) and if I use a mega link (public again with key), it will say e.pointer is undefined). I'm using the github link where topola is hosted. Shakespeare example not opening as well.

tasker25 commented 1 year ago

It is working fine for me where the embedded viewer calls the gedcom from my own website. The only difference I noticed was that there was a 'What's New' window but the tree displayed behind that OK. However, I see the Shakespeare example on the Topola webpage is still showing the 'Failed to fetch' problem.

Czajkor commented 1 year ago

Hi. I wouldn't close it, I still get failed to fetch for Google drive, which was reason I created this ticket. Regards

IstvanZachar commented 9 months ago

I cannot access my Google Drive file. I followed the description in the Readme here, but then the Viewer claims: "Failed to load file" without any further specification. The same ged file I can open without issues locally with Topola.

PeWu commented 9 months ago

Unfortunately, the Google Drive solution doesn't work anymore. Using Google Drive URLs like this is not possible anymore. It may be possible to implement this feature using the Google Drive API but I'm not sure yet what it would look like.

IstvanZachar commented 9 months ago

I see. Thank you for clarifying it.

BarrySilic commented 9 months ago

An easy way around this is to put the file on a website, then use that URL instead of the google drive one. For me, my file URL is: https://silic.us/gedcom/Silic.ged My tree URL is: https://pewu.github.io/topola-viewer/#/view?url=https%3A%2F%2Fsilic.us%2Fgedcom%2FSilic.ged

If you don't have a website, you can use a free Azure account. It works perfectly.

IstvanZachar commented 9 months ago

Thanks @BarrySilic! I have created a website at InfinityFreeHosting, and have deployed the Topola Viewer successfully. It can be accessed externally, and can load my tree from a local gedcom file. I have also uploaded same gedcom file to the same server. I can access this file from the browser by its URL as a plaintext file. However, the Topola Viewer just gives "Failed to load file" when I try to load the same URL. What could be the issue here?

I'd avoid hosting the gedcom file elsewhere than the Viewer, if possible.

BarrySilic commented 9 months ago

use <a href="yourfile.ged" download>GEDCOM

PeWu commented 9 months ago

If you're hosting Topola Viewer yourself, add &handleCors=false to the URL.

The current CORS proxy is configured to only work with Topola Viewer hosted on GitHub pages

IstvanZachar commented 9 months ago

@BarrySilic Can you please elaborate? I have simply uploaded a test gedcom file here http://zac.rf.gd/gedcom/test.ged, without embedding it into any html site. (The test file does not contain any private data, is safe to share/open.) The Topola Viewer is hosted at the same site: http://zac.rf.gd.

@PeWu No matter how I pass the URL of my test gedcom file to the Viewer, it fails to load it. What am I missing?

PeWu commented 9 months ago

Sorry I didn't make it clear. I meant adding &handleCors=false to the Topola Viewer URL, not to the GEDCOM URL. Try this: http://zac.rf.gd/#/view?url=http%3A%2F%2Fzac.rf.gd%2Fgedcom%2Ftest.ged&handleCors=false

I'll need to write a bit more explanation in the documentation about CORS issues because this comes up quite often.

IstvanZachar commented 9 months ago

Great @PeWu, now it works as expected! Yes, a more detailed documentation would be even more helpful (though after all, I managed to set up the Viewer on a server based on your guide).