Codename One Crash Protection Log Emails - codenameone

We've activated the Log.bindCrashProtection(true) feature on a number of our apps over the last two months.
In the first week or so we received a number of crash logs that we attended to as they came in but we have not received any new emails since 2020-11-02.
I did a Test yesterday (2020-12-02) where I forced a Null Pointer on the EDT on one of our app but we did not receive any new messages from Codename One.
Is this feature still available and if yes is there any limit on the number of Emails perhaps that we have hit?

Yes it is. You need to contact our support in the website chat.
There are a few problems that might occur e.g. if an email bounces once then our email provider can block you and we would need to unblock you manually.

Related

Snowflake: Your account has been locked. To continue using snowflake, please contact support

We are getting this error message on every single snowflake account in our organization. We are unable to contact support because we cannot login anywhere. We are on GCP-backed snowflake. Is this a known issue?
Maybe your account is locked due to non-payment? You should contact Snowflake Support so they can check why the account is locked.
If you email support#snowflake.com it automatically files a support case for you, so that should be used to file a support ticket when you are unable to even login.
It should be noted that this is impossible to find on their website, and it is impossible to reach a human for mission critical errors like this. Be warned if you want to move any of your critical systems onto snowflake.
We had the same issue in January 2023. My client called and informed me that all developers and admins received "Your account is locked". After opening an urgent case over the phone and then online, I finally heard back via email that their collections team was going to assist. So it was an issue with my client's credit card which was recently renewed. We had no notice - no emails or alerts about a billing problem. Awful.

Export multiple database records to iCal or gCal

I'm building a simple scheduling application for a client. It allows teachers to create a calendar of assignments for their students. I'd like to offer the ability for a student to add ALL assignments to their calendar at one time. Say there were 20 assignments over a 4 week period. This functionality would allow the student to download a single file, or follow a certain feed, to add all 20 assignments to their calendar at one time.
In my head this would be a single iCal file, but I'm not sure if iCal works that way. Alternately, each course /course/basket-weaving-101_51/ would have an RSS feed /course/basket-weaving-101_51/cal/ that could be followed.
Does anyone have experience with this, or could offer guidance?
Yes, one feed program that accepts parameters via the url could be used to offer a subscribeable calendar feed at whatever level of detail you wish. I say subscribeable as that, at a student level ... /student_id_or_name?feed=ics would offer the students the most convenient solution. They could subscribe once and then all the courses assignments that they are signed up for all courses over time could automatically appear as their calendar app refreshes the feed.
A single assignment could also offer a feed of the one 'event'. But that should probably be imported into their main calendar, rather than subscribing!
Note subscribing is different to importing - your help instructions need to make that clear as it is up to the user what they do with the feed.
Import(or add to calendar) is a once-off and will not update with new events/assignments.
Subscribing as a separate calendar I find much preferable as most calendar apps will let one check and uncheck the calendars as you need them. I have mykids timetables subscribed (and public holidays etc) but that's a very busy view, so often I just untick them
for a cleaner view.
You need to get familiar with the treatment of ical by the different calendar clients (outlook, webmail) before you can decide how best to target them. In general, they have two modes for treating ical: "accept an invitation" and "subscribe to an internet calendar".
The big advantage of "Accept an invitation" is that your events go into the user's calendar, and generate reminders and so on as if the user had created the event. The disadvantage is that you need to send your invitations one "event" at a time by email, and, particularly in Outlook, they may need to be viewed as mail before they appear in the calendar. If you're sending out 20 or more assignments, this may feel like spam to the recipient.
"Subscribe to an internet calendar" is a little misleading in that an ical feed is not a feed. You put the "whole calendar" on a website, and the client poles the website. Outlook and webmail clients are generally happy to display these calendars, but "importing" the events into the user's own calendar is a bit clunky. Gmail and webmail display the info on the same grid by default. Outlook displays a new grid for each calendar.
Modifications are a bit more complex for the subscription scenario. You will likely want to regenerate the whole calendar for affected students, whereas in the invitation scenario you just send one mail with the changed event.
Even so, if you have a database with courses, students and enrolments, you could do a nice little app that generates an ical per student, names it with their student number, and whacks it in a calendars folder. The student subscribes once to http://myuniversity.com/calendars/12345.ical, and each semester all their assignments are automatically in their web calendar.
Be careful with the subscription link. If tens of thousands of students subscribe to (pole) a dynamically generated calendar, you are going to have a lot of needless processing, and quite likely a performance headache. You want to be generating static files, then let your webserver negotiate with the client whether they need to be resent.

Nagios Core 3 custom notification exception

I'm hoping to avoid a hacked together mishmash to achieve something. I know it can be done with a mishmash but let's see if I'm missing a SIMPLE, easy way. This is Nagios Core 3.
I have a service. That service is checked 24x7x365. Notifications are sent 24x7x365, on WARNING and also on CRITICAL.
That is good--that is what I want.
However...now I want one single exception to that notification setup. NOTE: I do not want an exception to the monitoring setup--I want the console to always show the correct status, 24x7. I just want to make one exception for the notification (via email) on this service.
Here is the exception:
IF service state is WARN AND time of day is between 0300 and 0600, do NOT notify.
That's it. If it's CRITICAL, email-notify 24x7 (as it already does). If it's not between 3 and 6 a.m., notify regardless of WARN vs. CRIT (as it already does). The only exception is WARNING and 3-6 a.m.
Background: This is because we have maintenance that occurs every night between 3 and 6, which we've customized to produce a WARNING (not CRITICAL). I want notifications any time outside of this (admin may have accidentally launched maint in middle of day), and I want CRITICAL any time. I don't want to simply skip CHECKS during that time because I do want the console to be correct (a big bunch of yellows 0300-0600).
So, anyway, seems like I can kludge together a bunch of constructs but does anybody have a simple way to define this one "boolean AND" condition to the notification (only) schedule?
This is what scheduled downtime is for. If you create a scheduled downtime window alerts will be suppressed during this timeframe.
If that's not an option, then you need to different contacts for this service. 1 that notifies 24x7 and only on CRITICAL, and the other notifies 24x7(sans 3-6), and only receives WARNING notifications. Have them both point to the same contact email address.

Consecutive XML HTTP Requests seem to block on Google App Engine

I am working on an application on Google App Engine. Roughly this is what I do:
The user screen is split into 2 parts (actually 3, but lets leave that out for now). The left part (this takes upto 75% of the screen) has a document with some words highlighted. When one of these highlighted words are clicked the right part displays various meanings of it, example usage etc. The way this works is clicking the word send an XML HTTP Request to the server, where the sample usage(s)/meaning(s) are retrieved from the datastore. This data is returned and displayed.
My problem:
After I click on a few words consecutively, the application seems to "hang" - say, I click on 5 words in quick succession, clicking on the 6th word (or any word after that) doesn't replace the info regarding the 5th word on my right panel.
Since some data store columns (at least single valued properties) are indexed by default I'm guessing retrieval is not the bottleneck here. It is probably the requests.
Is such an issue known with the GAE? Any workarounds possible?
Kind of in a soup with this - the application was supposed to go live today. Urgent help required!
Thanks! :)
You're probably being limited to two simultaneous requests by your browser - not by appengine. If you click on a third link before the first two have had a chance to return, make sure your app can deal with requests returning for links that should no longer be displayed.
If you were hitting a limit on appengine, you'd see exceptions in your server logs. If you're not seeing those exceptions, it's probably a client-side issue.
Sorry for the late ack (for some reason I received a notification for the responses a day late, by which we had managed to fix a few things). It does look like the problem was at the data end - our code was doing some inserts, and it turns out you can't do too many of them quickly - the logs reported a transaction time-out error. The reason we couldn't spot it earlier in the logs was we were writing simply too much info out and this was buried in somewhere.
The clicks on the user-side were pulling data from this table.
Unfortunately, the GAE simulator doesn't simulate any timeout error - so even though we had tested with comparable volumes of data before deployment this error never happened during development.
Thanks again for your responses!
And yet again, I apologize for responding late.

How to control a web application through email? Or how to run php script by sending an email?

I want to run a web application on php and mysql, using the CakePHP framework. And to keep the threshold of using the site at a very low place, I want to not use the standard login with username/password. (And I don't want to hassle my users with something like OpenID either. Goes to user type.)
So I'm thinking that the users shall be able to log in by sending an email to login#domain.com with no subject or content required. And they will get, in reply, an email with a link that will log them in (it will contain a hash). Also I will let the users do some actions without even visiting the site at all, just send an email with command#domain.com and the command will be carried out. I will assume that the users and their email providers takes care of their email account security and as such there is no need for it on my site.
Now, how do I go from an email is sent to an account that is not read by humans to there being fired off some script (basically a "dummy browser client" calls an url( and the cakephp will take care of the rest)?
I have never used a cron job before, but I do think I understand their purpose or how they generally work. I can not have the script be called by random people visiting the site, as that solution won't work for several reasons. I think I would like to hear more about the possibility of having the script be run as response to an email coming in, if anyone has any input at all on that. If it's run as a cron job it would only check every X minutes and users would get a lag in their response (if i understand it correctly).
Since there will be different email addresses for different commands, like login#domain.com and I know what to do and how to do it to based on the sender email, i dont even need the content, subject or any other headers from the email.
There is a lot of worry about security of this application, I understand the issues, but without giving away my concept, I dont think it is a big issue for what I am doing. Also about the usability issue, there really isnt any. It's just gonna be login to provide changes on a users profile if/when they need that and one other command. And this is the main email and is very easy to remember and the outset of this whole concept.
I have used the pop3 php class with great success (there is also a Pear POP3 module).
Using the pop3 class looks something like this:
require ('pop3.php');
$pop3 = new pop3_class();
$pop3->hostname = MAILHOST;
$pop3->Open();
$pop3->Login('myemailaddress#mydomain.com', 'mypassword');
foreach($pop3->ListMessages("","") as $msgidx => $msgsize)
{
$headers = "";
$body = "";
$pop3->RetrieveMessage($msgidx, $headers, $body, -1);
}
I use it to monitor a POP3 mailbox which feeds into a database.
It gets called by a cronjob which uses wget to call the url to my php script.
*/5 * * * * "wget -q --http-user=me --http-passwd=pass 'http://mydomain.com/mail.php'" >> /dev/null 2>&1
Edit
I've been thinking about your need to have users send certain site commands by email.
Wouldn't it be easier to have a single address that multiple commands can be sent to rather than having multiple addresses?
I think the security concerns are pretty valid too. Unless the commands are non-destructive or aren't doing anything user-specific, the system will be wide open to anyone who knows how to spoof an email address (which would be everyone :) ).
You'll need some sort of CronJob/Timer Service that checks the Mailbox regularly and then acts on it. Alternatively, you should check the mailserver if it can run a script when a mail arrives (i.e. see if it's possible to put a spamfilter-script in and "abuse" that functionality to call your script instead).
With pure PHP, you're mostly out of luck as something needs to trigger the script. On a Pagewith a LOT of traffic, you could have your index.php or whatever do the check, but when no one visits your site for quite some time, then the mail will not be sent, and you have to be careful of "race conditions" when multiple people are accessing the script at the same time.
Edit: Just keep one usability flaw in mind: People with Multiple PCs and without an e-Mail Client on every one. For example, I use 4 PCs, but only 1 (my main one) has a Mail Client installed, and I use Webmail to check the other ones. Now, logging in and sending a mail through Webmail is not the greatest usability - in order to use YOUR site, I first have to log in to ANOTHER site, compose a mail through the crappy interface most Webmail tools have and wait for answer. Could as well use OpenID there :-)
If your server allows it you can use a .forward file or Procmail to start a process (php or anything) when a mail arrives to a certain address.
You don't want to hassle users with OpenID, but you want them to deal with this email scheme. Firstly, email can take a long time to go through. There isn't any guaranteed time that an email will be delivered in. It's not even guaranteed that the email will get there at all. I know things usually are quick, but it's not uncommon to take up to 10 minutes for a round trip to be completed. Also, unless you're encrypting the email, the link you are sending back is sent in the open. That means anybody can use that link to log in. Depending one how secure you want to be, this may or may not be an issue, but it's definitely something to think about. Using a non-standard login method like this is going to be a lot more work than it is probably worth, and I can't really see any advantages to the whole process.
I was also thinking using procmail to start some script. There is also formail, which might come in handy to change or extract headers. If you have admin access to the mail server, you could also use /etc/aliases and just pipe to your script.
Besides usability issues, you should really think about security - it's actually quite simple to send email with a fake sender address, so I would not rely on it for anything critical.
I agree with all the security concerns. Your assumption that "the users and their email providers takes care of their email account security" is not correct when it comes to the sender's e-mail address.
But since you specifically asked "how do I go from an email is sent to an account that is not read by humans to there being fired off some script", I recommend using procmail to deliver the incoming e-mail to a script you write.
I would not call a URL. I would have the script perform the work by reading the message sent in on stdin. That way, the script is not acessible to anyone on the web site.
To set this up, the e-mail address you provide to your users will have to be associated with a real user
on the system. In that user's home directory, create a file called ".procmailrc"
In that file, add these two lines:
:0 hb:
| /path/to/program
Where /path/to/program is the full path to the script or program for handling
the incoming message. Then create the script with code something like this:
#!/usr/bin/php
<?php
$fp=fopen('php://stdin','r');
while($line = fgets($fp)) {
[do something with each $line of input here]
}
?>
The e-mail message will not remain in the mailbox, so if you want to save or log it, have the script do it.
--
Bruce
I would seriously reconsider this approach. E-mail hasn't got very high reliability. There's all kinds of spamfilters that might intercept e-mails with links thereby rendering the "command" half-finished, not to mention the security risks.
It's very easy to spoof the sender-address on an e-mail. You are basically opening up your system to anyone.
Also instead of a username/password combination you're suddenly requiring the users to remember a list of commands to put in front of an email-address. It would be better to provide them with a username/password and then giving access to a help page.
In other words the usability and security of this scheme scores very low.
I can't really find any advantages to this approach that even comes close to outweighing the massive disadvantages.
One solution to prevent spam, make sure the first line, last line or a specific line contains a certain string, almost like a password, but a full sentence is better.
Only you have the word or words, pretty secure, just remember to delete the mails after use and those that do not have the secret line.
Apart from the security and usability email delivery can be another problem. Depending on the user's email provider, email delivery can be delayed from a few minutes to few hours.
There is a realy nice educational story on thedailywtf.com on designing software. The posed question should be solved by a proper design, not by techo-woopla.
Alexander, please read the linked story and think gloves, not email-driven webpage browsing.
PHP is not a hammer.

Resources