Instapy: Login A/B test detected! Trying another string...

Created on 15 Aug 2019  路  42Comments  路  Source: timgrossmann/InstaPy

My error after update

Login A/B test detected! Trying another string...

sessions end.

wontfix

Most helpful comment

To anybody still having this issue on 6.1
Its caused by a typo in the file _xpath_compile.py_

Line 159 "login_elem_no_such_exception": "//a[text()='Log``` In']",

It looks like this ^^^

It needs to look like this

Line 159 "login_elem_no_such_exception": "//button[text()='Log In']",

It will still throw the statement _Login A/B test detected! Trying another string..._ but then it _should_ login...

It most likely will ask for a security code that will be sent to your email, just enter that and you should be all set!

All 42 comments

same problem

Also have this exact issue - Is there a workaround for this?

same problem.

Same problem for me too, with no logs to show for it either...

#4873
I have the same problem:

InstaPy Version: 0.6.2
Workspace in use: "/root/InstaPy"

INFO [2019-08-16 05:38:23] [username]  Session started!

INFO [2019-08-16 05:38:23] [username]  -- Connection Checklist [1/3] (Internet Connection Status)
INFO [2019-08-16 05:38:27] [username]  - Internet Connection Status: ok
INFO [2019-08-16 05:38:27] [username]  - Current IP is "IP" and it's from "Country"
INFO [2019-08-16 05:38:27] [username]  -- Connection Checklist [2/3] (Instagram Server Status)
INFO [2019-08-16 05:38:33] [username]  - Instagram WebSite Status: Currently Up 
INFO [2019-08-16 05:38:33] [username]  - Instagram Response Time: 122.423 ms 
INFO [2019-08-16 05:38:33] [username]  - Instagram Reponse Code: 200
INFO [2019-08-16 05:38:33] [username]  - Instagram Server Status: ok
INFO [2019-08-16 05:38:33] [username]  -- Connection Checklist [3/3] (Hide Selenium Extension)
INFO [2019-08-16 05:38:33] [username]  - window.navigator.webdriver response: False
INFO [2019-08-16 05:38:33] [username]  - Hide Selenium Extension: ok
Cookie file not found, creating cookie...
Login A/B test detected! Trying another string...

CRITICAL [2019-08-16 05:38:48] [username]  Unable to login to Instagram! You will find more information in the logs above.

INFO [2019-08-16 05:38:52] [username]  Sessional Live Report:
    |> No any statistics to show


[Session lasted 34.68 seconds]
INFO [2019-08-16 05:38:52] [username]  Session ended!

Same problem for me too, and also here: no logs

this software is riddled with bugs... same problem

Same
Login A/B test detected! Trying another string...

I've fixed it logging in manually by using 'headless_browser=False' and adding a delay right after the 'print("Cookie file not found, creating cookie...")' in the login_util.py
So you can add sleep(60)and then while sleeping you can login manually and leave the script running.

But then I have another error while trying to like by locations or hashtags...
File "/usr/local/lib/python3.6/dist-packages/instapy/instapy.py", line 1914, in like_by_tags self.logger, File "/usr/local/lib/python3.6/dist-packages/instapy/like_util.py", line 606, in check_link media = post_page[0]["media"] KeyError: 'media'

I was getting this, you have to turn off two factor authentication or any security that sends a text code to your phone. I turned it off and it works now. Just idk why firefox is so slow in loading users

Same problem +1

Experiencing the same problem here

I also have this issue

+1 same error

This issue was fixed in the development branch

pip install -U git+https://github.com/timgrossman/InstaPy@dev to update

Not working. Everything is up to date

This issue was fixed in the development branch
pip install -U git+https://github.com/timgrossman/InstaPy@dev to update

Dude can you help me with this. I've updated to 0.6.2 from dev branch but the loading of likers of pictures is painfully slow. If you want to reproduce the issue ,its easy just use the follow_likers option from the documentation and you'll see that as the no. of users loaded increases it gets slower and slower. I think its a quick fix and its driving me crazy

running 0.6.2 now , not much of a difference it doesn't s shouw the Login A/B etc anymore.

it just kills the session now.

` ._. ._. ._. ._. ._. ._. ._. ._. ._. ._. ._.
No any custom workspace provided. ~using existing..
InstaPy Version: 0.6.2
._. ._. ._. ._. ._. ._. ._. ._.
Workspace in use: "/home/steven/InstaPy"
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2019-08-17 20:22:16] [.runs] Session started!
oooooooooooooooooooooooooooooooooooooooooooooooooooooo
INFO [2019-08-17 20:22:16] [
.runs] -- Connection Checklist [1/3] (Internet Connection Status)
INFO [2019-08-17 20:22:16] [.runs] - Internet Connection Status: ok
INFO [2019-08-17 20:22:16] [
.runs] - Current IP is "77.109.96.213" and it's from "Belgium/BE"
INFO [2019-08-17 20:22:17] [.runs] -- Connection Checklist [2/3] (Instagram Server Status)
INFO [2019-08-17 20:22:23] [
.runs] - Instagram WebSite Status: Currently Up
INFO [2019-08-17 20:22:23] [.runs] - Instagram Response Time: 112.239 ms
INFO [2019-08-17 20:22:23] [
.runs] - Instagram Reponse Code: 200
INFO [2019-08-17 20:22:23] [.runs] - Instagram Server Status: ok
INFO [2019-08-17 20:22:23] [
.runs] -- Connection Checklist [3/3] (Hide Selenium Extension)
INFO [2019-08-17 20:22:23] [.runs] - window.navigator.webdriver response: False
INFO [2019-08-17 20:22:23] [
.runs] - Hide Selenium Extension: ok
Cookie file not found, creating cookie...
Instagram detected an unusual login attempt
Check Instagram App for "Suspicious Login attempt" prompt
A security code was sent to your Email: v*s@s*.*
INFO [2019-08-17 20:23:11] [.runs] Security Code not present in /home/steven/InstaPy/logs/.runs/state.json file
Type the security code here: 572186
.......................................................................................................................
CRITICAL [2019-08-17 20:24:45] [*.runs] Unable to login to Instagram! You will find more information in the logs above.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

INFO [2019-08-17 20:24:46] [*.runs] Sessional Live Report:
|> No any statistics to show

[Session lasted 2.64 minutes]
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2019-08-17 20:24:46] [*.runs] Session ended!
oooooooooooooooooooooooooooooooooooooooooooooooooooooo
`

This issue was fixed in the development branch

pip install -U git+https://github.com/timgrossman/InstaPy@dev to update

I got my Instapy script running as usual after updating _and_ logging in using the two step verification process. You might need to set headless_browser = False on your script in order to enter the verification code IG sends you (adding a page delay on the settings also helps):

session = InstaPy(username="ig_user",
password="ig_password",
headless_browser=False,
page_delay=25
)
Hope that helps

To anybody still having this issue on 6.1
Its caused by a typo in the file _xpath_compile.py_

Line 159 "login_elem_no_such_exception": "//a[text()='Log``` In']",

It looks like this ^^^

It needs to look like this

Line 159 "login_elem_no_such_exception": "//button[text()='Log In']",

It will still throw the statement _Login A/B test detected! Trying another string..._ but then it _should_ login...

It most likely will ask for a security code that will be sent to your email, just enter that and you should be all set!

To anybody still having this issue on 6.1
Its caused by a typo in the file _xpath_compile.py_

Line 159 "login_elem_no_such_exception": "//a[text()='Log``` In']",

It looks like this ^^^

It needs to look like this

Line 159 "login_elem_no_such_exception": "//button[text()='Log In']",

It will still throw the statement _Login A/B test detected! Trying another string..._ but then it _should_ login...

It most likely will ask for a security code that will be sent to your email, just enter that and you should be all set!

it worked for me, thanks

Worked for me also!!

Do you know where the file xpath_compile.py is stored? I cannot seem to find it in my installation.

Do you know where the file xpath_compile.py is stored? I cannot seem to find it in my installation.

What OS are you using?

I'm currently on Mojave 10.14.5

Ummm I've never tried it on Mac...
On Linux its under/usr/local/lib/python3.6/dist-packages/instapy
On Windows its underE:\Users\(yourprofile)\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\instapy

Try to find python and then find site-packages and it should be under the folder called Instapy

I strangely don't even have that file on my Mac, the one mention of 'login_elem_no_such_exception' is in my login.util file:

try:
login_elem = browser.find_element_by_xpath(
read_xpath(login_user.__name__, "login_elem"))
except NoSuchElementException:
print("Login A/B test detected! Trying another string...")
try:
login_elem = browser.find_element_by_xpath(
read_xpath(login_user.__name__, "login_elem_no_such_exception")
)
except NoSuchElementException:
return False

@Flaunkerton2395 No that's where the error is thrown from but the reason it is thrown is because of a typo in another file

For instapy to function you have to have the file _xpath_compile.py_.

4895

4902

For RaspberryPi the xpath_compile.py file is stored in:

/home/pi/.local/lib/python3.7/site-packages/instapy/xpath_compile.py

For RaspberryPi the xpath_compile.py file is stored in: ...

@Flaunkerton2395 The same is for macOS. Please, check it.

Sent with GitHawk

To anybody still having this issue on 6.1
Its caused by a typo in the file _xpath_compile.py_

Line 159 "login_elem_no_such_exception": "//a[text()='Log``` In']",

It looks like this ^^^

It needs to look like this

Line 159 "login_elem_no_such_exception": "//button[text()='Log In']",

It will still throw the statement _Login A/B test detected! Trying another string..._ but then it _should_ login...

It most likely will ask for a security code that will be sent to your email, just enter that and you should be all set!

solved for me 鈿★笍

For RaspberryPi the xpath_compile.py file is stored in:

/home/pi/.local/lib/python3.7/site-packages/instapy/xpath_compile.py

If you use instapy-gui the path is the following:
instapy-gui/env/lib/python3.7/site-packages/instapy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this problem still occurs, please open a new issue

Hi guys, I'm using python 3.7 latest instapy, with chromedriver on Mac, and I check xpath file and looks fine but I'm still having the same problem, cannot running instapy. Someone knows how to solve this?

Hi guys, I'm using python 3.7 latest instapy, with chromedriver on Mac, and I check xpath file and looks fine but I'm still having the same problem, cannot running instapy. Someone knows how to solve this?

Welcome to 2020. Instapy is not longer supported.

problem

Seriously? Really?

problem

Seriously? Really?

Where were you the last 2 years? Mars ?

problem

Seriously? Really?

Where were you the last 2 years? Mars ?

if I tell you, you cannot believe it. Thank you for the info! I didn't see it.

Hi guys, I'm using python 3.7 latest instapy, with chromedriver on Mac, and I check xpath file and looks fine but I'm still having the same problem, cannot running instapy. Someone knows how to solve this?

Welcome to 2020. Instapy is not longer supported.

Where is it written? (writing this from 2050)

Hi guys, I'm using python 3.7 latest instapy, with chromedriver on Mac, and I check xpath file and looks fine but I'm still having the same problem, cannot running instapy. Someone knows how to solve this?

Welcome to 2020. Instapy is not longer supported.

Where is it written? (writing this from 2050)

shit.
got late.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ingorichter picture ingorichter  路  3Comments

Spyd3r0us picture Spyd3r0us  路  3Comments

drcyber975 picture drcyber975  路  3Comments

CharlesCCC picture CharlesCCC  路  3Comments

converge picture converge  路  3Comments