anadius / gd-efc

Google Drive - encrypted folder copy
https://anadius.github.io/gd-efc/
383 stars 176 forks source link

Error: 520 #28

Open Ex-Communicad0 opened 5 days ago

Ex-Communicad0 commented 5 days ago

Error: error code: 520

getting this error on old links generated, it was working fine till a week ago.

for newly generated links working fine, keys are same

any guidance or solution please thank you

the problem is generated many links before (parmanent) dont want to replace everything again is there any solution for that

anadius commented 5 days ago

Do you use Cloudflare Workers as your decryption server? I noticed that if the decryption server uses the old "Service Worker" format it throws this error a lot and works only some of the times.

I updated the workers code in this commit: 34fb13d

The easiest way to use the new code is as follows:

  1. Generate new files on https://anadius.github.io/gd-efc/build.html (use the same encryption key as earlier)
  2. Create a new Cloudflare Worker and use the new code.
  3. Swap the names of the old and the new worker.

There's a chance it was just a coincidence and Google simply blocks some requests, for unknown reason. Give it a try though.

Ex-Communicad0 commented 2 days ago
  1. pasted new code, note: new code was not deploying on workers js so i had to change this code

This error: Uncaught TypeError: Cannot set properties of undefined (setting 'b64') at worker.js:2:2211 at worker.js:2:2228

w.b64 = b64; return b64; })(this);

to this

self.b64 = b64; return b64; })(self);

also changed the decrypt php code

restarted the server no luck

tried disabling the cloudflare proxy on domain still same error on old links :(

  1. if i create new workers domain that will only apply for newly generated links right? and where to swap names on files which file?
anadius commented 2 days ago
  1. Oops, my bad. Remove w.b64=b64;, don't make any other changes. And you can't use that code on an old worker because it's missing some files and won't even let you save. And don't touch the PHP code, I haven't changed a single bit of it.
  2. No. Why would it apply to only new links? Generate new code on my website with the same encryption key and with the same decryption domains as the first time. Make a new worker with the new code and swap the worker names, in Cloudflare dashboard.
Ex-Communicad0 commented 2 days ago

Thanks, swaping the workers solved the issue now.

but i hosted decrypt script on my own subdomain where i was getting bad request on console is it because it is blocked?

i mean disabled the cloudflare workers before then tried with only hosted server domain but its producing same issue (bad request) , if cloudflare hits limit the issue will popup again :( maybe

anadius commented 2 days ago

I don't know what you hosted and where. I don't know if Google blocked some IP addresses and that's why it throws 520 error. All I know is that the change I did helped and nobody reported getting this error since I swapped the workers.