DexterHuang / CyberCodeOnline

Cyberpunk Text MMO RPG, built with React.js & Typescript
Other
1.13k stars 1.24k forks source link

Global skips working differently on mobile and web #3016

Open miguel-gil-barroso opened 1 year ago

miguel-gil-barroso commented 1 year ago

Recently i've started switching between the android app and the web version of the game, mostly because i need to use my phone for something else or viceversa and i've started noticing that, having the web version open, watching the afk task running, if i get a notification on my phone telling me the afk is finished after a global skip, it doesn't seem to apply the skip...

However if i instead open the notification to see it on my phone, the task is, as promised, completed. If i reload the page after "completing" it on android, the web version shows it completed, but reloading it before opening the mobile version shows no skip applied. This problem is becoming jarringly obvious to me now in the latest event that encourages AI farming as much as it does.

miguel-gil-barroso commented 1 year ago

it seems to happen "reliably", but not 100% of the times. since i started noticing it, i'd say it happens around 75% of times... or in bursts, considering yesterday all the times it happened were consecutive, but today i haven't experienced any yet

DexterHuang commented 1 year ago

is it possible that it just needs 1 or 2 sec for the effect to be committed? if you are on pc, you should not need to open your phone for skip to be applied, because skips are entirely server based, there is no need to refresh or open anything

miguel-gil-barroso commented 1 year ago

unfortunately that's not the case. i made sure to check a few times when it happened yesterday and it made no difference waiting a few seconds than waiting several minutes after getting the notification on my phone. however, as i said, if i opened the app instead, through the notification or directly, the afk appeared completed and, if i reconnected on pc, it then showed it completed as well.

i recently had the idea of checking if the timer got reduced in the process instead of finished (which shouldn't give a notification), either by watching how it changed when it happened or by timing the afk duration, but as i mentioned, i haven't been able to reproduce it today. i shall try to next time it happens, if it does

miguel-gil-barroso commented 1 year ago

it happened again and... i got some mixed results.

firstly, it seems the timer works "correctly", only it doesn't count skips, meaning that, after 10 minutes, it's reduced by 10 minutes. however, i do get the message that a global skip was happening.. and it goes back to the button to buy a skip after a few minutes, without affecting the timer.

secondly, reloading the page like in mobile (pulling the ui down) doesn't update the content most of the times. but reloading the site (with f5 or the reload button on the browser) seems to have a considerable chance to reload it properly.

finally, i noticed ublock origin was blocking... something in the site. after disabling it for the site and reloading it to apply the changes, everything worked "properly" again and haven't been able to reproduce the problem since then, not even by enabling ublock origin again.

DexterHuang commented 1 year ago

do you know what url was being blocked?

miguel-gil-barroso commented 1 year ago

this are the logs for the blocked or edited resources:

Logger output | | | | | | | | |:--- |:--- |:--- |:--- |:--- |:--- |:--- | | +1888 | \|\|google.com/log? | -- | docs.google.com | 0,1 | xhr | `https://play.google.com/log?format=json&hasfast=true&authuser=0` | | +27 | \|\|firebaselogging-pa.googleapis.com^ | -- | cybercodeonline.com | 3 | xhr | `https://firebaselogging-pa.googleapis.com/v1/firelog/legacy/log?key=AIzaSyCx80ru6-RXeTi3GvqkFsMVyMf-vpgIoVw` | | +17 | \|\|firebaselogging-pa.googleapis.com^ | -- | cybercodeonline.com | 3 | xhr | `https://firebaselogging-pa.googleapis.com/v1/firelog/legacy/log?key=AIzaSyCx80ru6-RXeTi3GvqkFsMVyMf-vpgIoVw` | | +7 | \|\|firebaselogging-pa.googleapis.com^ | -- | cybercodeonline.com | 3 | xhr | `https://firebaselogging-pa.googleapis.com/v1/firelog/legacy/log?key=AIzaSyCx80ru6-RXeTi3GvqkFsMVyMf-vpgIoVw` | | +2 | @@\|\|accounts.google.com^$generichide | ++ | accounts.google.com | 3,1 | generichide | `https://accounts.google.com/o/oauth2/iframe#origin=https%3A%2F%2Fcybercodeonline.com&rpcToken=655187246.9834541` | | +2 | googletagmanager_gtm.js | << | cybercodeonline.com | 3 | script | `https://www.googletagmanager.com/gtag/js?l=dataLayer&id=G-1ZQ6HN1SKL` | | +2 | \|\|googletagmanager.com/gtag/js$script,redirect-rule=googletagmanager_gtm.js:5 | -- | cybercodeonline.com | 3 | script | `https://www.googletagmanager.com/gtag/js?l=dataLayer&id=G-1ZQ6HN1SKL` | | +2 | \|\|googletagmanager.com^ | -- | cybercodeonline.com | 3 | script | `https://www.googletagmanager.com/gtag/js?l=dataLayer&id=G-1ZQ6HN1SKL` | | +1 | google-analytics_analytics.js | << | cybercodeonline.com | 3 | script | `https://www.google-analytics.com/analytics.js` | | +1 | \|\|google-analytics.com/analytics.js$script,redirect-rule=google-analytics_analytics.js:5 | -- | cybercodeonline.com | 3 | script | `https://www.google-analytics.com/analytics.js` | | +1 | \|\|google-analytics.com^$3p | -- | cybercodeonline.com | 3 | script | `https://www.google-analytics.com/analytics.js` |

and here's a link to the manual on the logger which has a section detailing the fields in this table. still, i should warn you that these logs are from right now, and, for now, the site is working as intended, so if ublock really is the cause of this problem, it probably isn't blocking the requests involved in the problem right now