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

SPIKE: Provisioning unreliable when multiple embedded clients are present (LMS) #433

Closed
klemay opened this issue Jan 30, 2019 · 9 comments · Fixed by hypothesis/viahtml#192

Comments

@klemay
Copy link
Contributor

klemay commented Jan 30, 2019

Reported via Zendesk.

An instructor using Canvas reported that when he creates Hypothesis assignments using HTML pages that have Hypothesis embedded, provisioning does not work reliably.

I have been able to reproduce this in Canvas, but not in Moodle or Blackboard. (The Sakai Nightly instance behaves so strangely that I don't think testing there would give us meaningful data).

Steps to reproduce

  1. In Canvas, create a Module Item or assignment using an HTML page that has Hypothesis embedded. This professor used http://www.americanyawp.com/reader/colliding-cultures/john-winthrop-dreams-of-a-city-on-a-hill-1630/; we reproduced using that URL as well as an H blog post: https://web.hypothes.is/blog/webinar-30-jan-2019-custom-annotation-groups-for-publishers-with-hypothesis/

  2. View your assignment and see that provisioning has worked:

screen shot 2019-01-30 at 4 55 22 pm

  1. Now, refresh your browser tab. You'll see the Public channel and will no longer be logged in as the LMS user (in my case, it logged me in to the Hypothesis account I'm using in another tab):

screen shot 2019-01-30 at 4 56 11 pm

The console throws the following errors:

screen shot 2019-01-30 at 4 57 49 pm

You might have to refresh your browser tab a few times to see this.

@klemay klemay added the lms label Jan 30, 2019
@klemay
Copy link
Contributor Author

klemay commented Feb 7, 2019

Update: a user saw this in D2L as well: https://hypothesis.zendesk.com/agent/tickets/3807

@seanh seanh removed the lms label Jul 10, 2019
@klemay klemay changed the title Provisioning doesn't work reliably in Canvas with pages that have embedded client Provisioning doesn't work reliably in the LMS app with pages that have embedded client Jul 8, 2020
@mkdir-washington-edu
Copy link

I believe these Canvas users are having the same problem: https://hypothesis.zendesk.com/agent/tickets/11179

Users built Canvas Assignments out of https://ohiostate.pressbooks.pub/vethisto/chapter/3-the-cellular-component/. The Sidebar doesn't automatically appear open when you visit this site, but Hypothesis is referenced in the HTML:
image

The end result is that the LMS app and the web app seem to alternate when refreshing the page, about 50% of the time each. Slack discussion here: https://hypothes-is.slack.com/archives/C2BLQDKHA/p1594216225325500.

@dwhly
Copy link
Member

dwhly commented Jul 8, 2020

Is this a broader class of problem, i.e. "Any parent frame that embeds a subframe which also has H embedded" or is "just the LMS app"?

@klemay klemay changed the title Provisioning doesn't work reliably in the LMS app with pages that have embedded client SPIKE: Provisioning unreliable when multiple embedded clients are present (LMS) Jul 8, 2020
@mkdir-washington-edu
Copy link

This user ran into this issue: https://hypothesis.zendesk.com/agent/tickets/13369

The LMS assignment giving them a problem is based off of https://www.americanyawp.com/reader/17-conquering-the-west/frederick-jackson-turner-significance-of-the-frontier-in-american-history-1893/.

The user tested this extensively and saw that if a certain app (LMS or web app) loads first, it seems to load again and again in Firefox and Safari, but it seemed to be variable in Chrome.

@mattdricker
Copy link
Contributor

Another instructor reporting same issue in Bb using Pressbooks for an assignment. No ticket to link to, as it came up during a success zoom call.

@mattdricker
Copy link
Contributor

Ticket with issue using LMS app on their own Pressbook document: https://app.hubspot.com/contacts/6291320/ticket/330164280/

@esanzgar
Copy link
Contributor

esanzgar commented Jun 2, 2021

I have made a preliminary assessment of this issue: there are two conflicting hypothesisConfig one from the LMS iframe and the other from the host page.

I observe that:

  • if the sidebar shows the Public group, the hostPageConfig is coming from host page and shows this value {showHighlights: "always"}
  • if the sidebar shows a LMS group, the hostPageConfig is coming from the LMS iframe and shows this value {openSidebar: true requestConfigFromFrame: {origin: "http://localhost:8001", ancestorLevel: 2} showHighlights: "always"}

host frame configuration

       // Inject the Hypothesis client.
        window.hypothesisConfig = function () {
            return {"showHighlights": "always"};
        }

LMS configuration

        // Inject the Hypothesis client.
        window.hypothesisConfig = function () {
            return {"openSidebar": "1", "requestConfigFromFrame": {"origin": "http://localhost:8001", "ancestorLevel": "2"}, "appType": "via", "showHighlights": true};
        }

Maybe a solution could be to make window.hypothesisConfig not writable (with Object.defineProperty) after the LMS has added it.

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

Successfully merging a pull request may close this issue.

6 participants