Out of memory error for more than a day. Code does not run - google-apps-script

I made a Slackbot with Google Apps Script and everything was fine until yesterday I started getting Out of memory error out of nowhere. Now I can't even run any of my working code. Has anyone encountered something similar? Not even console.log() will print, it just gives the same error. I tried running a simple function with console.log() in it and that didn't work either.
This is the code in my project. I wrote an infinite loop before to do spreadsheet actions but now it is removed.
function test() {
console.log("1");
}

The Out of memory error alert occurs because a variable grew too much on size. Without looking at your code I can't point which variable caused this behaviour, but I can help you in the right direction: first of all make sure that you are not saving all the data in a single variable. After that, check that there is no infinite loop in the code.
I hope to have helped you, but if you keep facing the problem don't hesitate to share the code so I can help you better.

Related

Error in google scripts - DocumentApp.openById

Since a couple of days im having this error:
We're sorry, a server error occurred. Please wait a bit and
try again
When this line its executed:
var temp = DocumentApp.openById(newTemplate.getId());
My code was working already, so i think its something internal of Google?
Any help? Thanks a lot
Alejandro
It seems like there is curently a bug
See here and here.
While you might get this error because of e.g. trying to open a non Google Docs document with DocumentApp, it is also possible that your problem is related to the bug.
give it a star to increase visibility.

Octave error : no such file

I'm running Octave 4.0.1 on windows 7 and I'm having this weird issue.
I created a functioning script which is saved under C:/User/Documents/Octave. This script also reads some files in a subfolder of this same location.
The problem is : my script correctly runs TWICE then I have the error "no such file" saying the software did not find my script (the same one I just ran). The only "solution" I have is restarting the whole software but then it still goes nuts on the third run.
In addition to that, my coworker tried it on an ubuntu machine and it seemed to work fine. Do somebody see an explanation?
Thanks
Here is the script :
data = [];
figure();
for i=1:200
filename = strcat('C:/Users/Utilisateur/Documents/Octave/data/DAQ_data_decoded_', num2str(1800+i))
d=lvm_import(filename);
data=[data d.Segment1.data(:,2)];
end;
data=reshape(data,6600,1);
hist(data);
The function lvm_import is a function I found on the web to extract data from a Labview data file. (d.Segment1.data(:,2) is a 33x1 array)
And the error message :
>> daqDataHist
error: no such file, 'C:\Users\Utilisateur\Documents\Octave\daqDataHist.m'
So I still don't really know what was going on but by adding fclose all at the end of the script I got rid of any error and can run the file as many times as I want. It was probably something going wrong with opening and closing the .lvm files and it "jammed" at some point.
Thanks anyway :)

RealTime getCollaborators() method returning only 1 Collaborators

I'm trying to get a list of current collaborators on load and getCollaborators() is always returning the local collaborator in the array.
Despite numerous tries, even using the quickstart sample for testing purposes, getCollaborators() is not working for me.
Is anyone facing similar issue with me? Would like to get some feedback on this issue.
Thanks!
https://developers.google.com/google-apps/realtime/realtime-quickstart`
I had this problem too. I'd check where you're calling getCollaborators. I was calling in OnFileLoaded, and at that point, the other collaborators aren't loaded yet.

rectangle function undefined in octave

for some reason, neither the octave terminal, nor my editor recognizes the rectangle-function.
For example, when I try to get the documentation via the help command, I get this:
octave-3.2.4:41> help rectangle
error: help: `rectangle' not found
I'm sure it's an incredibly stupid error, but I just can't find it.
Everything else is working fine.
I appreciate any help!
Hannah

Am I using the find method of the folder class correctly?

I had a script that used the find method of the folder class and it has worked fine for quite a while. Suddenly today it stopped working. I get the 'We're sorry, a server error occured. Please wait a bit and try again' message. It stopped working this morning.
I was able to recreate this error with just a few lines of code in new small script.
function myFunction() {
folder = DocsList.getFolder('test');
folder.find('testfile');
Logger.log('anything');
}
I made sure I had a folder called test and a file called testfile inside of it.
Any ideas why I am getting this error?
Thank you.
This has been recently reported as an issue -
https://code.google.com/p/google-apps-script-issues/issues/detail?id=2482
Please star it so that you can get notified of updates.