charlesbel / Microsoft-Rewards-Farmer

A simple bot that uses selenium to farm Microsoft Rewards written in Python
MIT License
1.02k stars 275 forks source link

[BUG] Stuck on "Ensuring login on Bing" #131

Closed Real-Zac closed 1 year ago

Real-Zac commented 2 years ago

It is stuck on "[LOGIN] Ensuring login on Bing..."

(https://user-images.githubusercontent.com/118482504/202889436-bab86a1d-5e5a-436b-9317-19e31dfa8343.png)

All login information is correct and there is proper syntax in the accounts file.

inverspe commented 2 years ago

restart

DumbAsFuck commented 2 years ago

what i did was schedule the script to run in the background 6 times a day at semi random intervals. has been working very well for me.

but i noticed i have 200 pts available which means the script hasnt run for at least 48-72 hours. i also am stuck on the ensuring login into bing. the first time it gave me some error in python. i think ms rewards may of changed something in their homepage source code for chrome. if so this will need an update.

edit: i got it to work after the like 10th try. not sure what is going on but im just gonna schedule it to run more often

semiino commented 2 years ago

I figured out that the script works properly only if it logs on to Bing with the original set language (for example I originally set the account using Bing in French. When I try to log in using Bing in another language it won't show me my points etc. and the script stays stuck on "Ensuring login on Bing..."). Therefore I changed the code on lines 91 and 133 using:

browser.get('https://www.bing.com/?setlang=fr&cc=fr&cc=FR') //This example is for the French version, you need to change the URL according to the language you need

instead of:

browser.get('https://www.bing.com/')

It worked for me

inverspe commented 2 years ago

I figured out that the script works properly only if it logs on to Bing with the original set language (for example I originally set the account using Bing in French. When I try to log in using Bing in another language it won't show me my points etc. and the script stays stuck on "Ensuring login on Bing..."). Therefore I changed the code on lines 91 and 133 using:

browser.get('https://www.bing.com/?setlang=fr&cc=fr&cc=FR') //This example is for the French version, you need to change the URL according to the language you need

instead of:

browser.get('https://www.bing.com/')

It worked for me

does the mobile search work for you? mine doesnt

semiino commented 2 years ago

I figured out that the script works properly only if it logs on to Bing with the original set language (for example I originally set the account using Bing in French. When I try to log in using Bing in another language it won't show me my points etc. and the script stays stuck on "Ensuring login on Bing..."). Therefore I changed the code on lines 91 and 133 using: browser.get('https://www.bing.com/?setlang=fr&cc=fr&cc=FR') //This example is for the French version, you need to change the URL according to the language you need instead of: browser.get('https://www.bing.com/') It worked for me

does the mobile search work for you? mine doesnt

Yes, it does.

Alternatively, you can edit line 221:

return('fr-FR', 'FR', '120') //Instead of fr (French) write down the abbreviation of the language you want to set.

I hope this helps!

Ector70 commented 2 years ago

I've tried various solutions but it still doesn't work

semiino commented 2 years ago

Are you using the headless mode? If so try not to use it by commenting lines 32 and 33, if you can watch what the program does it should be easier to figure out what's going on.

inverspe commented 2 years ago

Are you using the headless mode? If so try not to use it by commenting lines 32 and 33, if you can watch what the program does it should be easier to figure out what's going on.

when mine starts auto mobile search it gets stuck on ensuring login

if headless_mode : options.add_argument("--headless")

inverspe commented 2 years ago

I figured out that the script works properly only if it logs on to Bing with the original set language (for example I originally set the account using Bing in French. When I try to log in using Bing in another language it won't show me my points etc. and the script stays stuck on "Ensuring login on Bing..."). Therefore I changed the code on lines 91 and 133 using: browser.get('https://www.bing.com/?setlang=fr&cc=fr&cc=FR') //This example is for the French version, you need to change the URL according to the language you need instead of: browser.get('https://www.bing.com/') It worked for me

does the mobile search work for you? mine doesnt

Yes, it does.

Alternatively, you can edit line 221:

return('fr-FR', 'FR', '120') //Instead of fr (French) write down the abbreviation of the language you want to set.

I hope this helps!

what chrome version are you using?

inverspe commented 1 year ago

guys remove line 86 to fix mobile search

checkBingLogin(browser, isMobile)

AlexyGalaxy commented 1 year ago

guys remove line 86 to fix mobile search

checkBingLogin(browser, isMobile)

DO NOT COMMENT OUT LINE 86 if you do POINTS_COUNTER will not work properly.

Instead try this: -How to Fix Mobile: Comment out around line 134-137 with three double quotes above and below """

Refresh page

browser.get('https://bing.com/')
#Wait 5 seconds
time.sleep(10)
"""
LamoosaCaboosa commented 1 year ago

none of these fixes worked for me... is there a working fix?

inverspe commented 1 year ago

none of these fixes worked for me... is there a working fix?

you could try this alternative https://github.com/thearyadev/MSRF for the meantime I tried everything to fix mine theres too many problems and I think this project is pretty much abandoned try removing line 130-134

LamoosaCaboosa commented 1 year ago
Screen Shot 2023-01-16 at 5 38 52 PM

not sure what this does, but now it all works perfectly fine for me! :) used most of the tips here as well as this change and its just working now

LamoosaCaboosa commented 1 year ago

i guess its just skipping mobile, but if thats the cost, im fine with it

inverspe commented 1 year ago

i guess its just skipping mobile, but if thats the cost, im fine with it

You fixed mobile search?

LamoosaCaboosa commented 1 year ago

nooooonono, i just turned it off until i find a way to make it work again

inverspe commented 1 year ago

nooooonono, i just turned it off until i find a way to make it work again

Ah okay I did the same i removed the checkmobile thing and works fine again but it won’t check how much points you have

LamoosaCaboosa commented 1 year ago

The way that I showed still counts the points just fine. I'm still trying to figure out how to make mobile work

inverspe commented 1 year ago

The way that I showed still counts the points just fine. I'm still trying to figure out how to make mobile work

Yes you remove line 86 if you want mobile search to work again don’t change line 87

LamoosaCaboosa commented 1 year ago
Screen Shot 2023-01-16 at 7 57 57 PM

(for my method for turning off mobile mode you need to change this a little too)

AlexyGalaxy commented 1 year ago

try this

Like i said before, do not comment out line 87 it brakes the code in ways you do not understand. Instead comment out these 4 lines of code. This made mobile work for me.

AlexyGalaxy commented 1 year ago

Since yall dont understand. I forked this project and uploaded my current working version that will complete all searches and punch cards. Also made the README even more simple to understand.

https://github.com/AlexyGalaxy/Microsoft-Rewards-Farmer

inverspe commented 1 year ago

Since yall dont understand. I forked this project and uploaded my current working version that will complete all searches and punch cards. Also made the README even more simple to understand.

https://github.com/AlexyGalaxy/Microsoft-Rewards-Farmer

yeah mobile search works now but another problem arose now it takes roughly around 10 minutes to complete a single mobile search

AlexyGalaxy commented 1 year ago

Do you mean it stays on 1/20 for 10 mins or it takes 10 mins to complete all 20 mobile searches?

Sometimes the Mobile searches will not execute properly the first time. There is an if statement that will wait 30-60 secs then re-try mobile searches. I have sat and watched the script without headless mode and it IS doing the mobile searches however, BING is not counting any.

Although not ideal, everything WILL complete. The longer time the script takes the less likely to be banned from Microsoft. This is completely against their TOS. My script from the link above should take a total of 30 mins per account.

If you want to make the script quicker to finish, look for time.sleep(2). This makes your script wait the amount of seconds that are within the parentheses. The lower the number the less time the script spends waiting to move on. I do not reccomend doing this because the quicker your code executes the more likely you are to be banned.

Re-Try mobile is around line 1012 in my code

if searchesRemaining != 0 : #retry mobile searches
AlexyGalaxy commented 1 year ago

One of my accounts is stuck on mobile seach 7/20 for over an hour. I think I know how to fix it. I will make an edit soon and update my code on github.

LamoosaCaboosa commented 1 year ago
Screen Shot 2023-01-17 at 6 59 15 PM

this happened when i tried! :( but your version definetely shows better errors.

AlexyGalaxy commented 1 year ago

I am close to fixing the issues. Currently everything works except for mobile searches. Only way i get mobile searches to run is by commenting out the lines below. I am looking for a soultion to implement. I will update my github now. (comment out lines of code by placing a # before code)

line 1022

completeDailySet(browser)

line 1028

#completePunchCards(browser)

line 1034

#completeMorePromotions(browser)
AlexyGalaxy commented 1 year ago
Screen Shot 2023-01-17 at 6 59 15 PM

this happened when i tried! :( but your version definetely shows better errors.

I just updated my github. It now completes all pc and mobile searches without issues.

If you have any more issues let me know.

AlexyGalaxy commented 1 year ago

I just updated the code again. Everything seems to be working now. Again if you have issues let me know.

https://github.com/AlexyGalaxy/Microsoft-Rewards-Farmer

If all goes well next update should include Account.Logger.txt and Error.Logger.txt

LamoosaCaboosa commented 1 year ago

It has been working wonderfully for me so far! Great work!

charlesbel commented 1 year ago

Fixed with v3.0 #188