So the story goes that I had a perfectly working script for the past week or so, it would log in to google (by loading a certain firefox profile - which allowed me to skip 2 -step verification), scrape some data from the company site (which needs google login to access), save to csv and quit. This would occur hourly for analysis.
Alas, alack, the issue arose this morning where instead of logging in directly, the two-step verification is appearing, even though the script has not changed at all. I cannot program to enter username+password, because it sends a text to my phone with a verification code after this...
I'm absolutely at a loss. I thought loading the firefox profile would avoid this problem (and it did for ~ 5 days). Can you help me?
I am using Python 2.7, Selenium & Mac OSX
Related
I am currently running a sports betting model on my Amazon EC2 Instance. The code (using the selenium library) refreshes the sports betting page every 2 minutes.
When I have the Instance open the code works completely fine, but when I close the instance and let the code run I cannot interact with the webpage https://duelbits.com/sportsbook/live/soccer.
I am specifically having trouble with this code (it just simply gets the list of matches available to bet on the website live soccer page):
WebDriverWait(driver, 3).until(EC.element_to_be_clickable(
(By.XPATH,'(//div[contains(#class,"styled__Event")])')))
It seems the website realises that it is not a real user using the website, is there anyway I can bypass this?
We have recently began migrating to ColdFusion 2018 Enterprise, but have found that the scheduled tasks do not work. Although the relevant cfm file works if run in the browser on the same server, if we try and run it as a scheduled tasks then it does not work (although it will say it has run successfully on the screen).
The log file just contains a single line for each run:
Information","DefaultQuartzScheduler_Worker-5","11/20/20","12:48:18","","Task default.takename triggered."
From what I understand there should be additional lines for the http request etc, however.
We have tried various usernames and passwords, including admin accounts to make sure it is not a permissions issue but nothing seems to make any difference.
We have also tried outputting to a file but nothing ever populates the file, although it does update the file's modified date with the date/time the tasks ran (or create a new file if necessary).
Does anyone have any experience with this type of problem?
This ended up being an IIS permissions issue. We resolved it by enabling anonymous authentication for both the directory that the relevant cfm files are contained in, as well as the "jakarta" directory that I believe ColdFusion uses for some integration requirements. Scheduled tasks then ran as expected.
I have many (like 30) shiny apps deployed on shiny server (open source version). It happens from time to time that when I (or one of my colleagues) update one of the packages, some of the apps stop working. I wonder if instead of checking all the apps manually every time we change anything, there is some way to perform the checks automatically? An ideal solution would be to have a script that is run daily (hourly?) checking if each app can be loaded and if not, an email is send. I am not taking about small errors here. More about app not loading at all due to in ex. some function missing. Any suggestions on how this can be achieved?
Django CMS = 3.1.1, 3.1.2, 3.1.3
Django = 1.6.5, 1.6.11
The problem is:
a user with proper access rights, who previously successfully edited a page, returns to a page, and attempts to edit it.
he logs in
he selects the page - in no-edit view, it loads fine, it has a collection of content
he goes to edit view - there is absolutely no page content - static content is there, but all content relevant to that particular page is missing.
Reverting versions does no good - any version is blank.
A user who is not stuck in this state can view and edit the page just fine.
When the problem occurs, it is stuck there for many repetitions.
Things that don't fix the problem:
server restarts
dumping and reloading the database
logging out logging in
upgrading django cms across the 3.1.X space
removing reversion
flushing the mysql cache
We have the same basic installation in vagrant dev boxes, a test server emulating all settings of the live (but with older data), and the live server - all three installations have seen this problem across 3 different variants of our other code bases.
Our data dumps from a MUCH smaller database taken from 9/13 do not have this problem
We haven't been able to find a trigger or a root cause.
The problem IS coming in intermittently, but over longish time spans. For example:
2 weeks ago, all privileged users could edit the page
4 days ago - several users experienced the problem. It was repeatable on more than 1/2 the pages of the site, but 2 pages worked fine for those users. Problem was repeatable for hours.
today - in the morning the problem persisted in the 4 day ago state.
6 hours later - the problem is gone on the live site, but persists elsewhere.
5 days later - it's back and it's affecting ALL users, including those who had not previously been affected.
I feel like I'm chasing a phantom here. Any help would be appreciated. I'm glad to give data dumps or anything else requested to see what can be done or if there's a best way to turn on debug logging to trace this.
I started a job as a web developer at a company a few months ago managing a bunch of Coldfusion applications among other things. Apparently a scheduled task was set up many years ago, and worked fine until it stopped working under one of the previous web developers, a couple of years ago. No one knows why it stopped working, but it is now my job to fix it. This is my first job as a web developer, I didn't know CF when I started my job (barely knew it existed), and I only started learning about scheduled tasks this morning, so just know that I am a total newbie.
The file is a basic one- it just updates a table in the database. If you run the URL in the browser (which is what they have been doing for the past couple of years), it runs fine, and everything is updated. The scheduled task, which was set to run every night, has not been updating the file. I've tried turning on the log in CF Admin, setting it to run at various times this morning, and also just telling it to run manually, and according to the log, it is executing (with no errors), but the file is not being updated. I tried commenting out most of the file and just telling it to send a basic e-mail, with no variables or anything, but I am getting the same result.
Any ideas? I have no idea what to try from here. I tried looking for a solution online, but the only post I found similar to my situation is this, where people seem to be suggesting that the issue may be variables that are not available to the scheduler:
coldfusion scheduled task not sending emails
There are no variables on my page right now though. I tried running the task via CFSCHEDULE, per the suggestion on that page, but I got the same result as before. Some of the other suggestions (server monitor/FusionReactor/cflog) I just plain don't know how to do, so I have not tried those.
Edit: Right now, this is the only code in the page which is not commented out:
<cfmail
to="[e-mail address]"
from="[e-mail address]"
Subject="is it running at all?">
Is it running?
</cfmail>
Edit 2: Okay, now I've got something like this before and after the code for the e-mail:
<cflog
text = "before e-mail"
application = "yes"
log = "Scheduler"
type = "information">
I see the log messages if I actually go to the URL for the file (and the e-mail is sent as well), but not if I tell it to run the scheduled task from CF admin. Because the e-mail sends when I open the file in the browser, I don't think it is a problem with the mail server.
Edit 3: Yes, the e-mail addresses are plain, hard-coded strings.
I'm not exactly sure what you mean by "covered" by an Application.cfm file though. There is an Application.cfm file in the top-level of the site, but not within this particular sub-directory. There are a number of Application scope variables, but none that are used in the file as it is now.
Edit 4: Thank you for the explanation. As I said, total n00b when it comes to CF, so I appreciate the help. The Application.cfm page for this application checks to see if you are logged in, and if you are not, redirects you to the log in page. Could that be the issue?
Edit 5: YAY! It seems like that was the issue. Thank you thank you thank you! Leigh, please submit that as an answer so that I can choose it. You are my hero!
(From the comments )
A long shot but is your scheduled task inside a directory covered by an Application.cfm/Application.cfc file? The reason for asking is that the code inside the parent Application.cfm file executes first before your .cfm script. Is there any code inside the Application.cfm file that aborts a request or redirects (such as permissions check)?