Syntax error when selecting Google Drive in file picker (M3.2.1)

Syntax error when selecting Google Drive in file picker (M3.2.1)

by Hartmut Scherer -
Number of replies: 2

A week ago we migrated from Moodle 3.1. to Moodle 3.2.1+ (Build: 20170223). We renamed the public_html of Moodle 3.1 to public_htmlm3.1 and public_htmlm3.2 to public_html.

Today students found out that they can no longer use files from Google Drive in the File Picker. When they select Google Drive in the File Picker they get a syntax error message. I purged all caches but the syntax error is still there.

file picker with syntax error message








I added the complete debug message below and appreciate any help. 

With kind regards,

Hartmut

-----------------------------

SyntaxError

JSON.parse: unexpected end of data at line 1 column 1 of the JSON data

File: http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1490138525/mcore-debug.js

Line: 24483


http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1490138525/mcore-debug.js:24483:12ln: 77

http://pibc-edu.com/lib/javascript.php/1490138525&;

M.core_filepicker.init/<.request/cfg.on.complete

ln: 27

http://pibc-edu.com/theme/yui_combo.php?rollup/3.1

Y.Subscriber.prototype._notify

ln: 19

http://pibc-edu.com/theme/yui_combo.php?rollup/3.1

Y.Subscriber.prototype.notify

ln: 15

http://pibc-edu.com/theme/yui_combo.php?rollup/3.1

Y.CustomEvent.prototype._notify

ln: 31

http://pibc-edu.com/theme/yui_combo.php?rollup/3.1

Y.CustomEvent.prototype._procSubs

ln: 13

http://pibc-edu.com/theme/yui_combo.php?rollup/3.1

Y.CustomEvent.prototype.fireSimple

ln: 24

http://pibc-edu.com/theme/yui_combo.php?rollup/3.1

Y.CustomEvent.prototype._fire

ln: 19

http://pibc-edu.com/theme/yui_combo.php?rollup/3.1

ET.prototype.fire

ln: 13

http://pibc-edu.com/theme/yui_combo.php?rollup/3.1

IO.prototype._evt

ln: 9

http://pibc-edu.com/theme/yui_combo.php?rollup/3.1

IO.prototype.complete

ln: 17

http://pibc-edu.com/theme/yui_combo.php?rollup/3.1

IO.prototype._rS/<

Average of ratings: -
In reply to Hartmut Scherer

Re: Syntax error when selecting Google Drive in file picker (M3.2.1)

by Hartmut Scherer -

Greetings,

I continued testing to get more details about this syntax error. Here is the updated report.

I deleted all session files in moodledata/session, truncated mdl_sessions, cleared browser (Google Chrome), purged all caches in Moodle 3.2.1 and tried to upload a file from Google Drive in an assignment. When I opened the assignment, I went to additional files in edit settings and tried to connect to Google Drive. I am able to login to my Google Drive account. Right after this, I got the following error:

SyntaxError: Unexpected end of JSON input    at JSON.parse (<anonymous>)    at Object.Y.namespace.parse (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1490220641/mcore-debug.js:24483:18)    at FilePickerHelper.complete (http://pibc-edu.com/lib/javascript.php/1490220641/repository/filepicker.js:56:84)    at Y.Subscriber._notify (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1490220641/mcore-debug.js:13680:35)    at Y.Subscriber.notify (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1490220641/mcore-debug.js:13709:24)    at Y.CustomEvent._notify (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1490220641/mcore-debug.js:13372:17)    at Y.CustomEvent._procSubs (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1490220641/mcore-debug.js:13498:36)    at Y.CustomEvent.fireSimple (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1490220641/mcore-debug.js:13465:18)    at Y.CustomEvent._fire (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1490220641/mcore-debug.js:13447:29)    at IO.fire (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1490220641/mcore-debug.js:14600:22)

Then I logged out of Moodle.

In mdl_sessions of phpMyAdmin, I found this:

mdl_sessions









Several observations:

  • I do not understand why there are so many entries in mdl_sessions, if I was the only user who logged in. 
  • My user id is 3, not 0, but I don't see this in mdl_sessions. User id 0 is the id of a guest user.
  • The folder Moodledata/sessions has no files. The folder is still empty.
If this is the wrong forum to post this issue, I kindly ask the forum moderator to move this post to the appropriate forum. 

With kind regards,

Hartmut

In reply to Hartmut Scherer

Re: Syntax error when selecting Google Drive in file picker (M3.2.1)

by Tania Ramirez -

Did you get any solution for this problem? One of my teachers is getting something similar too :/