It appears I’m getting an error while trying to debug my service. The error is on Backendless.ServerCode.addService(EmailService);
According to what I read the debug version should superceed the deployed version but it kept running the deployed version. So, I then stop the deployed version but it was still being used.
Do I need to change the version number when testing a new version?
I don’t see any services neither in your app, nor in the database. Have you managed to solve this problem yet?
Probably you accidentally defined the EmailService twice on emailService.js:66 ?
//var sg = require(‘sendgrid’)(process.env.SENDGRID_API_KEY);
var sg = require(‘sendgrid’)(SENDGRID_API_KEY);
var request = sg.emptyRequest({
method: ‘POST’,
path: ‘/v3/mail/send’,
body: {
personalizations: [
{
to: [
{
email: ‘daniel.p.spring@gmail.com’
}
],
subject: ‘Sending with SendGrid is Fun’
}
],
from: {
email: ‘daniel.p.spring@gmail.com’
},
content: [
{
type: ‘text/plain’,
value: ‘and easy to do anywhere, even with Node.js’
}
]
}
});
// With promise
sg.API(request)
.then(function (response) {
console.log(response.statusCode);
console.log(response.body);
console.log(response.headers);
})
.catch(function (error) {
// error is an instance of SendGridError
// The full response is attached to error.response
console.log(error.response.statusCode);
});
I first deployed yesterday and I had no issues (that I saw) running a debug version over the deployed version. Today i received an email that I was over the size threshold and not I get this error. I can’t image there’s a correlation between the size and being able to run/debug a new version.
You nailed it. I don’t know why but there was another directory in my project named deploy with a duplicate set of code. I deleted it and was able to run my project as expected. Thanks for the help.