Google Picker API Invalid origin value error

Putting an end, the only way to solve this is to remove the trailing slash after

From

docs.google.com/

To

docs.google.com

Contrary,

The google.script.host.orgin gives the "https://docs.google.com/" which causes the error. Hence you need to hard code as

"https://docs.google.com"

Google has made some changes recently which might have bubbled this issue.

UPDATE

You can use this function - and call - ...... setOrigin(getOrigin())

function getOrigin() {
    var url = google.script.host.origin;
    return url.substr(url.length - 1) === "/" ? url.substr(0, url.length - 1) : url;
}