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

502 Bad Gateway - When trying to view an activity help page #931

Open
shaansubbaiah opened this issue Aug 15, 2020 · 8 comments
Open

502 Bad Gateway - When trying to view an activity help page #931

shaansubbaiah opened this issue Aug 15, 2020 · 8 comments

Comments

@shaansubbaiah
Copy link
Member

shaansubbaiah commented Aug 15, 2020

Tested on:

  1. Sugar Live Build 0.117 (Buster/10) - VMWare Workstation
  2. Debian Bullseye/11 0.117-3 - KVM

Reproduce:

  1. altshiftH in an Activity
  2. F3 in an Activity to go to Home View -> Right click the icon under the XO -> Click View Help

If possible, please test on OLPC hardware/ native installs of Sugar to make sure its not a VM issue.

Screenshot:
image

@chimosky
Copy link
Member

Haven't been able to do much investigation but this also appears in the logs,

1597621834.410915 ERROR root: set_active() failed: org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying

@quozl
Copy link
Contributor

quozl commented Aug 17, 2020

@shaansubbaiah, thanks, interesting.

  • is seen on Ubuntu 20.04 with Sugar 0.117 and no Help activity installed.
  • is not seen on Ubuntu 18.04 with Sugar 0.114 and Help-20.1 installed,
  • is not seen on Fedora 18 with Sugar 0.112 and Help-20.2 installed.

@chimosky, NoReply on set_active is #840. Get used to it, nobody is interested in fixing Telepathy or even telling them about it. 😁

@shaansubbaiah
Copy link
Member Author

Installing the Help activity from the master branch still results in this issue. (Sugar Live Build 0.117)

Opening the activity, I am presented with this:
image

Following the workflow above, I still get the 502 - Bad Gateway issue

index.html is missing, checked the directory. Have to investigate further.

@quozl
Copy link
Contributor

quozl commented Aug 17, 2020

Unlike other activities, the Help activity can't be installed from the repository, it has to be built. Clone it to somewhere other than ~/Activities, install python-sphinx, make html, python setup.py dist_xo, then install the bundle.

@shaansubbaiah
Copy link
Member Author

@quozl that worked, I am now able to view the help pages for the activities. However, none of the images load while viewing the documentation from within the help activity but load when viewed from another activity/using the shortcut/ xo menu.

eg. Viewing the help page for Browse in the Help activity.
image

@shaansubbaiah
Copy link
Member Author

Seems like the image loading failure has already been reported in Help Activity #104

I can access the images through the browser using file:///usr/share/sugar/activities/Help.activity/html/images/.png

Changing the image uris in the html files from _images/<image-name>.jpg to ../images/<image-name>.jpg renders the image correctly, but it is not an appropriate fix.


Regarding the issue in Sugar, would it not be better to display some form of 'Help activity is not installed' with or without the 502 Error?

@shaansubbaiah
Copy link
Member Author

@quozl, right now,

  1. make html copies images/ to html/_images/
  2. setup dist_xo creates an XO bundle omitting html/_images/. (images are in images/)
  3. In _resource_load_started_cb(), tries to replace 'html/_images' with 'images' in the request uri but it seems to have no effect. I haven't found a way to redirect the request uri.

One way that I've managed to fix it is by preventing setup dist_xo from omitting html/_images. images/ can then be omitted in the bundle (otherwise bundle is 2x big). Then, even the function _resource_load_started_cb() can be removed.

The only difference is that images will be in html/_images instead of images/ after installing.

@quozl
Copy link
Contributor

quozl commented Sep 5, 2020

Thanks. I agree. Summarising;

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

3 participants