Created
October 26, 2016 21:32
-
-
Save acucciniello/034ef879ee541046561220dfac3f0920 to your computer and use it in GitHub Desktop.
The remote endpoint could not be called, or the response it returned was invalid. -> Error in Amazon Dev Portal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function createFile (test, callback) { | |
callback(test) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs') | |
var authorize = require('./google/authorize.js') | |
var clientSecretsFile = 'client_secret.json' | |
var createFile = ('./google/createFile.js') | |
module.exports = CreateFileFunction | |
function CreateFileFunction (intent, session, response) { | |
var accessToken = JSON.stringify(session.user.accessToken) | |
fs.readFile(clientSecretsFile.toString(), function processClientSecrets (err, content) { | |
if (err) { | |
console.log('Error Loading client secret file: ' + err) | |
var secretsError = 'There was an issue reaching the skill' | |
response.tell(secretsError) | |
return | |
} else { | |
authorize(JSON.parse(content), accessToken, function (err, oauthClient) { | |
if (err) { | |
var noOauth = 'We failed getting an oauthClient' | |
response.tell(noOauth) | |
return err | |
} | |
var test = 'test' | |
createFile(test, function (name) { | |
response.tell(name) | |
}) | |
}) | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have tested the CreateFileFunction and it runs successfully (meaning outputs a message to alexa) right after I call the authorize function. Once I call createFile, it seems to throw this error: The remote endpoint could not be called, or the response it returned was invalid. The purpose of creatFile this point is just to take in string
test
call thecallback
function and have alexa just respond sayingtest
. Any idea why it is failing on that function?