Amazon Echo Lambda Function ZIP issue - node.js

So, I'm trying to invoke a Google Could Messaging service from Amazon echo, using NodeJS (using mac os x).
Since my main.js file contains 3rd party libraries, I installed them with
"npm install" command. I'm using the following libraries for sure:
https://github.com/ToothlessGear/node-gcm for NodeJS Google Could Messaging
async
When I made my ZIP file and uploaded to amazon lambda, I got the following error message:
It looks like your Lambda function "oAa" is unable to be edited inline, so you need to re-upload any changes. This may be because your file is too large or your zip file contains more than one file to edit. However, you can still invoke your function right now.
The ZIP file isn't large, it's only 1.5 Mb. I assume I have this error, because the file contains all the libraries I need, with more than one js file.
I've attached the folder structure of my ZIP file. It contains from one file and one folder. I have one file in the main folder, and a tons of libraries next to it (inside the second folder).
UPDATE
this is the error message what I get:
{
"errorMessage": "Exception: TypeError: Cannot read property 'application' of undefined"
}
and this didn't work as a solution:
https://forums.developer.amazon.com/forums/message.jspa?messageID=18330
Did any of you met with the same issue in the past? May I kindly ask for your help, guys ?
Thanks,
Karoly

I got it to work by not zipping the directory (and contents) but by adding the contents of the directory to a zip archive. Basically, I removed the upper level directory. AWS Lambda's UI was able to locate my .js then.

It's hard to tell what exactly the problem is with Alexa, did you make sure you filled out the configuration and event sources tab correctly (this would be under the AWS part). Did you update your application ID? This is the biggest pain in the butt. Did you just upload your zip folder and click test? (which is incorrect).

I don't think this is an error, per se. I get this frequently and my skills still work without problem. I believe all this means is that "your Lambda function xxxx is unable to be edited inline". You will have to continue editing in an external editor and uploading the zip instead of being able to edit in Amazons lambda text editor.
I think the TypeError in your update is an unrelated issue.

I was receiving this error and solved it by looking at CloudWatch logs. You will see much more detailed error messages in there, and a log will be created each time you try to run your function.

Related

Application problem after build - ElectronJS

I've build my electronJS application with electron-packager and after the build finished, when I launched it, every data was gone. And I got an error that I've never got before on the dev app. (C.F screenshot)
paths are right because it's working on my dev app with the same configuration.
How can I fix this quickly please.
I've tried to change the directory to full path, change inside of the config.js file.
C.F : https://imgur.com/gallery/VN17hNf
Get all my data and my application work correctly. (get all data, add data, display data)
I've finally found the problem. When you build your app, you need to use relative paths. Like path.join(xxx). The app doesn't understand the ./your_path.
And next problem that I've solved, if you use json file and write data inside of it, you need to have a unpacked app w/ .asar file.

Joomla 3 problems using Akeeba Release system with zip

I'm trying to use the Joomla ARS. I've set it up and it seems to work for everything except the download of zip files.
I've set it up so that you can see the file in the front end but when you click on it a:
The requested document was not found on this server
error is thrown.
I've tried directly linking the file and it downloads fine. I've also set up an article to check that it'll download and again it works fine. So I don't think there are any permission issues since the zip file can be downloaded just not by using ARS.
Finally I've also tried different file types in ARS and if I swap the zip file for an xml file or a pdf file they both download fine.
Any ideas about how to debug?
I figured it out :)
The site had add a suffix to url switched on which was stopping it getting the correct route. Changed that and it worked as expected.

Cannot write applicationHost.config

I am trying to deploy an application and I get the following exception
System.Runtime.InteropServices.COMException (0x800719F3): Filename:
\?\C:\Windows\system32\inetsrv\config\applicationHost.config Error:
Cannot write configuration file
I have many applications already hosted on the same server and have never faced the same issue. I am unable to create AppPool manually as well.
Something that you could do is go to inetpub/history and try using an older file that is not corrupt (you can use notepad++ to compare both for example).
Take care with the modifications directly on the file and the encoding used when editing .. I would recommend doing the changes via GUI or APPCMD/PowerShell to prevent this.

Uploading Chrome Extension - Error: Failed to process your item

When uploading my zip file using the Developer Dashboard, I'm getting the following error:
An error occurred: Failed to process your item.
Can not process the manifest file.,Can not process the message.json file.,Can not process the key.pem file.,Chrome Web Store system error, please try again later.
I've followed 3 different tutorials (2 on extensions, and 1 on uploading to the Developer Dashboard) that I found on creating an extension on Googles' site. None of them say to create a message.json so I didn't create one (not sure why its telling me it can't process it). There is also no key.pem file, as they said do not generate this file and don't include it - as it will be generated when you upload it.
It says try again later, but I've tried several weeks now with no luck.
Currently, I'm exploring if my zip file is generated "funny" from 7-zip. I'd use the built in windows zip once I get that working again - however it seems corrupted.
My manifest file is in the root folder, and and the extension works in developer mode on my chrome. I've quadruple checked that the JSON is valid as well.
The extension works great for me, but fails the upload process.
How do I get past this step of the process?
Make sure manifest.json is in the root of the zip archive (not inside any directory)
Use the standard deflate zipping method in 7-zip, not anything fancy like deflate64
The answer to this was:
In the 7-Zip settings, I was using the compression method Deflate64, I changed it to Deflate and it the zip file was accepted. Thanks to #wOxxOm
I probably wouldn't have had this problem but my windows built in zip is currently corrupted and used 7zip to make a zip file.

About updating a node-webkit app

I want to set auto-updates up for my apps before I release. I'm a budding programmer, so when I looked into node-webkit-updater I was pretty confused. It seems under-documented to me. Can someone explain the overall update mechanism that it helps implement?
As an alternative to node-webkit-updater, I was thinking of creating my own update system. I kinda like how Apple handles extension updates and I was thinking about replicating it. This would involve putting a JSON/XML manifest file on Amazon S3 along with the latest versions of the app for all platforms. The app checks the file at startup and replaces itself with the new version.
Is the latter sound plausible? Am I better off going with node-webkit-updater? If so, can someone explain it to me please? My app is a Mac + Windows project.
This is what we did:
The first script of the page checks a custom "manifest" (.txt file) on the server, which contains some arbitrary text, e.g. version number.
If this value differs from a local version of the manifest, then download a .zip file from server. (The zip contains the latest nwjs website. You could have a separate one for each platform).
Unzip into a local directory (we use 7za command line util).
Set window.location.href to above local directory (index.html).
I know this is a old question, but here is the answer :)
https://www.npmjs.org/package/node-webkit-updater

Resources