Unknown RPC service?

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I have created a custom widget which runs fine when using the "previewer" on my Windows machine.  However, when I upload the files to my hosting site (App Engine) the following happens...

The "settings.html" shows but in my Chrome console I see:  
      "Unknown RPC service: rscmd_getAdditionalParams"

When attempting to save a setting, I get the following in the console:
      "Unknown RPC service: rscmd_saveSettings"

Both of these errors reference "gadgets.min.js"

"<script src="//rvashow2.appspot.com/gadgets/gadgets.min.js"></script>"
 is in my "settings.html" file just before the closing body tag.

My widget is very simple.
At this point I'm just trying to save, and then retrieve an "additional parameter"
Photo of OC Zingo

OC Zingo

  • 220 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Stuart Lees

Stuart Lees, Employee

  • 586 Points 500 badge 2x thumb
It sounds like you need to test your custom Widget in a presentation in the RVA platform by adding your Widget to the list of Gadgets in your company. I recommend reviewing a README of one of our existing Widgets in Github such as Web Page Widget
Photo of Stuart Lees

Stuart Lees, Employee

  • 586 Points 500 badge 2x thumb
README for Web Page Widget is here. Have a look to the Deployment section. 

Thanks
Photo of OC Zingo

OC Zingo

  • 220 Points 100 badge 2x thumb
Yes... I actually did do that.
I added it to a presentation and the settings seem to save properly.

The loading of the widget on the page seems to be having an issue.
I am calling the "readyEvent()" method  after loading, but I'm not sure it's loading properly.

I put some static text in the widget so I know when it has finished.  But I don't see anything.
Photo of Neil Backhurst

Neil Backhurst

  • 70 Points
Hi, 
Did anyone have a resolution for this as we are seeing a similar issue with our custom widget. It would seem the additional parameters are not being loaded.

We have called the readyEvent()

Any advice would be appreciate?

Thanks
(Edited)
Photo of Stephen Garrett

Stephen Garrett, Champion

  • 2,674 Points 2k badge 2x thumb
Hey Neil,

I have been trying to learn the ins and outs of widgets lately, too. I made a simple "Hello World" widget that I tried to document. I put explanations in the code at different points in the process of saving and retrieving data. It's here, if you want to check it out... 

https://github.com/tantangula/widget-hello-world

I have hosted it, and I've been able to use it in my presentations. If you try it, let me know. I'd love to get some feedback.

Stephen
Photo of Neil Backhurst

Neil Backhurst

  • 70 Points
Hi Stephen, 

Thanks for the link I'll have a look.

The main issue I have is getting the data back from settings into the widget, but it looks like you have that working!

Neil
Photo of Meghna Gogna

Meghna Gogna

  • 60 Points
hi ,
i am also facing the same problem while deploying widget on local server

please give a cause of this problem,

meghna
Photo of Alex Kolenoff

Alex Kolenoff

  • 3,506 Points 3k badge 2x thumb
Hi Meghna, one of the suggestions from Stuart was to first view the README of one of the existing widgets here - https://github.com/Rise-Vision/widget-web-page

Stephen Garrett then made some suggestions above in a comment where he created and documented a simple "Hello World" widget that works for him - https://github.com/tantangula/widget-hello-world

Would you be able to take a look and see if either of those helps and if not, please let us know with some details?
Photo of Stephen Garrett

Stephen Garrett, Champion

  • 2,674 Points 2k badge 2x thumb
I seem to remember getting this error when i didn't register a function that the player was trying to use...

gadgets.rpc.register("rscmd_play_" + id, RiseVision.WeatherRadar.play);
gadgets.rpc.register("rscmd_pause_" + id, RiseVision.WeatherRadar.pause);
gadgets.rpc.register("rscmd_stop_" + id, RiseVision.WeatherRadar.stop);
Does that sound right Alex?
Photo of Stephen Garrett

Stephen Garrett, Champion

  • 2,674 Points 2k badge 2x thumb
I think the original poster's problem may have been solved by adding...
gadgets.rpc.register("rsparam_set_" + id, RiseVision.WeatherRadar.getAdditionalParams);
This code is in the main.js file in the Hello Word code.