-
Bug
-
Resolution: Fixed
-
Minor
-
2.7.7, 2.8.5
-
MOODLE_27_STABLE, MOODLE_28_STABLE
-
MOODLE_27_STABLE, MOODLE_28_STABLE
-
MDL-49669_master -
When attempting to connect to my external backpack I am getting the following error.
You could not be connected to an external backpack for the following reason: The data return from the backpack was invalid.
I can reproduce this reliably on Moodle 2.7 - Moodle 2.9 and on qa.moodle.net as well.
To reproduce:
- I log in as anyone.
- I browse to My profile settings > Badges > Backpack settings
- I click "Sign in with your email"
- I follow the prompts in the popup.
- When I get taken back to Moodle it shows "connecting..." and then that finishes and I get an error.
Interestingly this affects myself but not Yuliya, so potentially there is something related to the backpack there.
I used my existing gmail account and created a new persona account using my Totara email address. Neither worked on my local or on QA.
Yuliya and myself put a bit of effort into investigating this, the end result of which is that the call to the displayer API is resulting in HTML being returned rather than the expected JSON.
https://github.com/mozilla/openbadges-backpack/wiki/Using-the-Displayer-API
Mozilla use this same URL to serve both the HTML email conversion interface and to perform the JSON conversion.
We should be getting JSON back but instead are getting the manual HTML process which we don't deal with.
The problem is why we get the HTML version and not the JSON version.
Could be curl, could be mozilla.
Noting there are several reports of this in the Moodle forums and at least one in the Mozilla forums.
- has a non-specific relationship to
-
MDL-51390 Error connecting to external backpack - data invalid
- Closed