popcorn-official / popcorn-desktop

Popcorn Time is a multi-platform, free software BitTorrent client that includes an integrated media player ( Windows / Mac / Linux ) A Butter-Project Fork
https://popcorn-time.site
Other
9.48k stars 627 forks source link

Automatically update API's server URL's not working #3035

Closed dutchy1001 closed 3 days ago

dutchy1001 commented 2 months ago

Operating System Version:

seems to affect all Operating Systems

Popcorn Time Version:

version 0.5.1 and before

Download date:

N/A

Download url:

N/A

Expected Behaviour:

when clicking to refresh API's in settings an update to the API's with a message for succesful update

Actual Behaviour:

It gives error message the update failed

Steps to reproduce the behaviour:

  1. Open PCT and go to settings, scroll down to "API Server(s)"
  2. Click icon to update/refresh the API's
  3. After a few the error message appears

talked about this in #3030 and simular as #3034

Screenshot(s) of issue or error(s) logs of developer console (Windows/Linux: F12, MacOS: ⌘ + 0 ... then 'console' tab) (recommended):

N/A

merseyV commented 2 months ago

Steps to reproduce the behaviour:

Or, download/make a new/clean install of any Popcorntime version (with the automatically update API feature). Accept (ticked) default options on the "Terms and Conditions" window:

please wait Error

A manual update of the API's will be saved as "custom" values in the 'settings.db' and loaded when PTapp reboots. https://fusme.link/, https://jfper.link/, https://uxert.link/, https;//yrkde.link/
A successful Auto-update produces "dhtInfo"/"dhtData" values in the appdata 'settings db" file: Consequently, manual inputs will not appear in the API address (drop-down lists) .. and it will throw a transient "Error" message every time PTapp is rebooted?

Manual API settings db
grimy86 commented 2 months ago

Steps to reproduce the behaviour:

Or, download/make a new/clean install of any Popcorntime version (with the automatically update API feature). Accept (ticked) default options on the "Terms and Conditions" window:

please wait Error A manual update of the API's will be saved as "custom" values in the 'settings.db' and loaded when PTapp reboots. https://fusme.link/, https://jfper.link/, https://uxert.link/, https;//yrkde.link/ A successful Auto-update produces "dhtInfo"/"dhtData" values in the appdata 'settings db" file: Consequently, manual inputs will not appear in the API address (drop-down lists) .. and it will throw a transient "Error" message every time PTapp is rebooted?

Manual API settings db

Worked for me, thanks.

Maybemine commented 2 months ago

Thank you, this worked for me as well.

overwatch3560 commented 2 months ago

what is the solution i don't understand

grimy86 commented 2 months ago

what is the solution i don't understand

Iirc: Settings -> API and then replace the keys there with:

https://fusme.link/, https://jfper.link/, https://uxert.link/, https://yrkde.link/

overwatch3560 commented 2 months ago

thank you it worked for me

overwatch3560 commented 2 months ago

it worked until yesterday @grimy86...

dutchy1001 commented 2 months ago

@overwatch3560 what worked until yesterday? I dont understand what should work??

Movies and series are still displaying with the above API links. Clicking the refresh button for the API's doesn't mean you get new movies/series, it means it will check IF there is a "new" API available or it can take dead ones away.

I understand that the update button (in the settings tab) still isn't working, this will stay this way untill there is a new build/release for us to download when they fix it.

So far with the given API's (https://fusme.link/, https://jfper.link/, https://uxert.link/, https://yrkde.link/) PCT still works

Hosseinmehrfard commented 1 month ago

thank you it worked for me

hassanbenhzaine commented 1 month ago

Issue still outthere (API server URLS update fail), i had to manually update the API links to: https://fusme.link/, https://jfper.link/, https://uxert.link/, https;//yrkde.link/

Thanks merseyV

overwatch3560 commented 4 weeks ago

Is this issue gonna be fixed soon any developer that can answer ? Its pretty annoying

dutchy1001 commented 3 weeks ago

With the given API links in the above posts Popcorntime still works and adds new movies. We understand it's an issue that it wont change automatic but works when added manual.

If there is a developer that wants to take on this issue please submit a pull request (with a fix).

PS. I don't code myself and only help with support.

merseyV commented 3 weeks ago

If there is a developer ...

"Is there a Dev in the house?" .............................................. (silence!!!)

milahu commented 2 weeks ago

still an issue

Please wait... Updating the API Server URLs Error: API Server URLs could not be updated

patched popcorntime/src/app/updater.js ```js Updater.updateDHT = function (e) { const self = this; if (!Settings.dht) { if (e && e !== 'urls') { self.alertIcon('error'); self.alertMessage('error'); console.log(`Updater.updateDHT error 1`); } return; } else if (e && e !== 'urls') { self.alertIcon(); self.alertMessage('wait'); } const dht = new DHT({verify: ed.verify}); const hash = Buffer(Settings.dht, 'hex'); dht.once('ready', function () { dht.get(hash, function (err, node) { if (err || !node || !node.v) { if (e && e !== 'urls') { self.alertIcon('error'); self.alertMessage('error'); console.log(`Updater.updateDHT error 2: e=${e} err=${err} node=${node} Settings.dht=${Settings.dht}`); } return; } ```
Updater.updateDHT error 2: e=enable err=null node=null Settings.dht=a4a9ad29e303e137ecb995c50a4e104b3e8f72e5

popcorntime/node_modules/butter-settings-popcorntime.app/index.js

    dht: 'a4a9ad29e303e137ecb995c50a4e104b3e8f72e5',

popcorntime/node_modules/butter-settings-popcorntime.app/package.json

{
  "name": "butter-settings-popcorntime.app",
  "version": "0.0.10",

https://www.npmjs.com/package/butter-settings-popcorntime.app

0.0.12 • Public • Published a year ago

but index.js was not changed between version 0.0.10 and 0.0.12

so the issues seems to be that nobody is seeding

magnet:?xt=urn:btih:a4a9ad29e303e137ecb995c50a4e104b3e8f72e5&dn=popcorntime.api.servers

this btih is also mentioned in https://github.com/popcorn-official/popcorn-android/pull/806

it's a4a9ad29e303e137ecb995c50a4e104b3e8f72e5 - hash generated on server by private/public keys and uses on desktop client

so all the official popcorntime api servers (with access to the private key) seem to be gone

ivan1986 commented 2 weeks ago

hi

need fix https://github.com/popcorn-time-ru/dht-annoncer

on server run node put.js but now some work incorrect and not anounce to dht

milahu commented 2 weeks ago

so the issues seems to be that nobody is seeding

no, i tried to fetch a4a9ad29e303e137ecb995c50a4e104b3e8f72e5 with qbittorrent but qbittorrent silently fails

actually this is a client issue in popcorn-desktop

fetching the data from DHT works, based on dht-keyvalue

git clone --depth=1 https://github.com/milahu/popcorntime-get-api-servers
cd popcorntime-get-api-servers
pnpm install
./popcorntime-get-api-servers.js

res {"server":"https://fusme.link/,https://jfper.link/,https://uxert.link/,https://yrkde.link/","git":"https://github.com/popcorn-official/popcorn-desktop/","site":"https://popcorn-time.site/","r":"PopcornTimeApp","v":"0.5.0","keys":{"os":"Butter","fanart":"ce4bba4b3cc473306c6cddb4e1cb0da4","tvdb":"80A769280C71D83B","tmdb":"ac92176abc89a80e6f5df9510e326601","trakttv":{"id":"647c69e4ed1ad13393bf6edd9d8f9fb6fe9faf405b44320a6b71ab960b4540a2","s":"f55b0a53c63af683588b47f6de94226b7572a6f83f40bd44c58a7c83fe1f2cb1"}}}

ivan1986 commented 2 weeks ago

cool, it's work but need test on windows

ivan1986 commented 2 weeks ago

https://github.com/popcorn-official/popcorn-desktop/pull/3048

ruinetto commented 2 days ago

Thank you very much, @merseyV. Your recommendations worked perfectly!🤩 Now we have the best BitTorrent client back.👏

"You're my savior, man. My own personal Jesus Christ" 🙏

merseyV commented 1 day ago

Your recommendations worked perfectly!

If you mean the workaround (manual update?) .. It's no longer necessary: The Devs have fixed the "Automatically update" function (server backend, I think .. not sure?). Any accolades for steadying the ship (rightly) belongs to them!

My own personal Jesus Christ"

The last dude (with that "call-sign") got betrayed, crucified, speared - and starved to death! Sorry (no offence!) .. think I'll give that a miss!! 🤣 🤣

ivan1986 commented 1 day ago

It's no longer necessary: The Devs have fixed the "Automatically update"

No, merge and revert, need merge #3055 and i can not reopen this issue

ivan1986 commented 15 hours ago

merging same, it works, and also fix buils - app image need set arch, because in package we have prebuild for many arch