Popcorn-desktop: [Remote app] RPC call to getcurrentlist fails

Created on 9 Jul 2020  路  11Comments  路  Source: popcorn-official/popcorn-desktop

Operating System Version:
OSX 10.15.4

Popcorn Time Version:
Version 0.4.4 (0.4.4)

Download date:
9-Jul-2020

Download url (optional):
From popcorntime.sh

Expected Behaviour

Return a list of results in the page
...

Actual Behaviour

Returns error
{
"jsonrpc": "2.0",
"error": {
"code": -32603,
"message": "TypeError: Cannot read property 'currentView' of undefined"
},
"id": "10"
}
...

Steps to reproduce the behaviour

Place a RPC call to 'getcurrentlist'

Screenshot of error from developer console (optional)

Couldnt find any error on the console

Possible file and line number which is failing
/src/app/httpapi.js line 287

I think App.getView().Content.currentView.ItemList is undefined

bug help wanted

All 11 comments

Hi @anikraj1994 , what is the related feature ? remote connection ?

Any app to recommand we could test if things works as expected ?

Yes, a remote app which i wrote.

https://play.google.com/store/apps/details?id=com.anikrajc.remote

The home screen should display movie tiles with images if everything is working as expected. Now its just a white page because the getcurrentlist rpc call is failing on newer PCT desktop app.

Ok, I install your app, I will try to not forget to give you feedback.

Hi,

Any idea since which version it is broken ?

For me it works with 3.10(build 200 i think) but it's broke with 3.10-build 279 ... and the App.getView() was changed since dev build 277 i think.

I don't have time to finish to test right now. I will again look at it, but a bit later.

but it's broke with 3.10-build 279 ... and the App.getView() was changed since dev build 277 i think.

Yep, you are right on it. With 277 we got https://github.com/popcorn-official/popcorn-desktop/commit/04f23ac1827e371a6842e51f0775d1fab66b8c18 and with 279 https://github.com/popcorn-official/popcorn-desktop/commit/091fb2eae28210e887a4406898cf270c4668461d

build 277 (Mar 19, 2018 9:10:20 AM) and 279 fail/, but it works with #200 (Nov 1, 2016 4:24:22 PM)

huge gap :/

Its the marionette update imo, some view needs to be defined correctly.

Ok, I have few things fixed but look like more methods are broken and they need to be checked one by one.

@anikraj1994 I've fixed some methods :

  • getloading
  • getstreamurl
  • getplaying
  • setselection
  • getselection
  • getcurrentlist
  • setplayer
  • selectepisode
  • filtergenre
  • filtersorter
  • getsorters
  • filtertype
  • gettypes
  • filtersearch
  • volume
  • seek
  • getsubtitle
  • setsubtitle
  • subtitleoffset

Next dev build (439) will have the changes.. so if you want to test and provide feedback, i'll appreciate, because i'm not always sure what results or behaviors are really expected.

For now, I've just quick fixed what i've seen were broken, but not everything because there are broken ones I don't understand why (togglemute, toggleplaying for example) and it's time consuming to debug and test... and i havent found any remote app working 100% with 0.3.10. IMO, the thing need to be refactored but it's not a priority.

If you have some particular methods you want us to fix/check don't hesitate to ask because else it isn't really something we will focus on.

Thx

@Persei08 Thanks a lot for the fix. Will definitely test out the build 439 and report back.

more fixes in #1746, they are in dev branch for now but those will be in next build :

  • toggleplaying
  • togglefavourite
  • togglewatched
  • togglequality
  • togglemute
  • togglefullscreen
  • getsubtitles
  • setsubtitle

but i think there could be some issue with togglefavourite on PCT side... and togglefullscreen only works on player view if i remember well

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lucasdcrk picture lucasdcrk  路  3Comments

Villelmo picture Villelmo  路  4Comments

kk47042 picture kk47042  路  3Comments

Faaabiii picture Faaabiii  路  4Comments

rohinarora picture rohinarora  路  4Comments