Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to fetch #130

Open
Czajkor opened this issue Dec 28, 2022 · 25 comments
Open

Failed to fetch #130

Czajkor opened this issue Dec 28, 2022 · 25 comments

Comments

@Czajkor
Copy link

Czajkor commented Dec 28, 2022

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
Copy link
Author

Czajkor commented Dec 29, 2022

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

Nothing Here, Yet

This domain is available to use

@PeWu
Copy link
Owner

PeWu commented Jan 3, 2023

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
Copy link

@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
Copy link

Same issue here, can't load from URL.

@tasker25
Copy link

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
Copy link

dima-ser commented Jan 30, 2023

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
Copy link

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
Copy link

tasker25 commented Jun 15, 2023

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
Copy link

dima-ser commented Jun 15, 2023

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: #144 (specifically, this comment: #144 (comment) ) 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
Copy link

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
Copy link
Owner

PeWu commented Aug 13, 2023

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

@BattouSaeen
Copy link

BattouSaeen commented Aug 13, 2023

@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
Copy link

tasker25 commented Aug 13, 2023

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
Copy link
Author

Czajkor commented Aug 14, 2023

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

@PeWu PeWu reopened this Aug 14, 2023
@IstvanZachar
Copy link

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
Copy link
Owner

PeWu commented Feb 13, 2024

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
Copy link

I see. Thank you for clarifying it.

@BarrySilic
Copy link

BarrySilic commented Feb 13, 2024

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
Copy link

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
Copy link

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

@PeWu
Copy link
Owner

PeWu commented Feb 15, 2024

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
Copy link

IstvanZachar commented Feb 15, 2024

@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
Copy link
Owner

PeWu commented Feb 16, 2024

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
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants