Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feeding pet to mount status and then rehatching/selecting incorrectly equips the pet #11072

Open
shanaqui opened this issue Mar 18, 2019 · 17 comments

Comments

@shanaqui
Copy link

_@Aerilita (3b724a41-48d3-4048-ae27-70b258cf5a72): "Here's something I ran into twice today with different pets, but it's not 100% recreatable.
0. The pet selected next to the avatar is not the one I'm feeding.

  1. Fed Desert Wolf Cub into a mount. The icon displays an egg and a potion, because I have the ones required.
  2. Click the icon. The purple line runs across the top, but nothing changes in the inventory. However, there's a Desert Wolf Cub next to my avatar.
  3. Hard refresh doesn't change anything at this point.

Screenshot

I'll keep them this way for now in case it's visible in the database."_

Following those steps, I was able to replicate it exactly. In the Hall of Heroes, my current pet was listed as the pet I had fed until it became a mount, although that pet had a value of -1 (meaning previously fed to mount status).

Refreshing or syncing after the pet becomes a mount before trying to rehatch it prevents this issue.

So two issues here:

  • Rehatching the pet right after feeding it isn't working
  • Attempting to rehatch the pet right after feeding equips it when you do not own it
@Alys
Copy link
Contributor

Alys commented Mar 19, 2019

Confirmed Aerilita's report in the database:

"items.currentPet": "Wolf-Desert",
"items.pets.Wolf-Desert": -1,
"items.mounts.Wolf-Desert": true,

@Alys
Copy link
Contributor

Alys commented Jun 26, 2019

Another two reports from @Aerilita (3b724a41-48d3-4048-ae27-70b258cf5a72):

from 10 hours ago:
"I've got that "fed the pet, tried to re-hatch, equipped the non-existent pet instead" issue happening again, with a Watery panda. The purple line ran just right at the last feeding, but I did have a 502 error in the middle (reloaded after it though...). I don't remember if there's any information needed about this bug, so I'll leave my pets in the current state for now."

from 8 hours ago:
"And it happened again. I was really careful and synced before last feeding. I guess the current state is as useful as the previous one, only the pet is different..."

I can't find anything directly relevant in Loggly, although there are a lot of errors caused by a webhook so maybe that's slowing down the website's responsiveness, which could cause odd behaviour like this. I'm searching for more details about the webhook since we're likely to want to get the errors reduced even apart from this issue.

    "webhooks": [
        {
            "type": "globalActivity",
            "label": "",
            "enabled": true,
            "url": "https://habitica-monster-api.herokuapp.com/webhooks/habitica",
            "id": "7d30d757-0637-480c-a2f3-84189e61ff7a",
            "options": {},
            "createdAt": "2018-07-08T16:22:59.377Z",
            "updatedAt": "2019-06-26T20:53:50.998Z"
        }
    ]

{"fullError":{"name":"ParseError","host":"habitica-monster-api.herokuapp.com","hostname":"habitica-monster-api.herokuapp.com","method":"POST","path":"/webhooks/habitica","protocol":"https:","url":"https://habitica-monster-api.herokuapp.com/webhooks/habitica","gotOptions":{"path":"/webhooks/habitica","protocol":"https:","slashes":true,"auth":null,"host":"habitica-monster-api.herokuapp.com","port":null,"hostname":"habitica-monster-api.herokuapp.com","hash":null,"search":null,"query":null,"pathname":"/webhooks/habitica","href":"https://habitica-monster-api.herokuapp.com/webhooks/habitica","retry":{"methods":{},"statusCodes":{},"errorCodes":{}},"headers":{"user-agent":"got/9.6.0 (https://github.com/sindresorhus/got)","accept":"application/json","accept-encoding":"gzip, deflate","content-type":"application/json","content-length":12220},"hooks":{"beforeRequest":[],"beforeRedirect":[],"beforeRetry":[],"afterResponse":[],"beforeError":[],"init":[]},"decompress":true,"throwHttpErrors":true,"followRedirect":true,"stream":false,"form":false,"json":true,"cache":false,"useElectronNet":false,"body":"{"type":"scored","direction":"up","delta":0.5798096619915684,"task":{"repeat":{"m":true,"t":true,"w":true,"th":true,"f":true,"s":true,"su":true},"challenge":{},"group":{"approval":{"required":false,"approved":false,"requested":false},"assignedUsers":[],"sharedCompletion":"recurringCompletion"},"frequency":"daily","everyX":1,"streak":70,"daysOfMonth":[],"weeksOfMonth":[],"nextDue":["2019-06-26T20:00:00.000Z","2019-06-27T20:00:00.000Z","2019-06-28T20:00:00.000Z","2019-06-29T20:00:00.000Z","2019-06-30T20:00:00.000Z","2019-07-01T20:00:00.000Z"],"yesterDaily":true,"history":[...],"completed":true,"collapseChecklist":false,"type":"daily","notes":"","tags":["b885c32d-389f-462e-b1f8-b14d1f4ef3eb","8331253c-d202-4b18-97d7-900cd5babadf"],"value":45.61845234012969,"priority":1,"attribute":"str","startDate":"2018-07-11T20:00:00.000Z","checklist":[],"reminders":[],"createdAt":"2018-07-12T14:45:33.292Z","updatedAt":"2019-06-26T20:53:42.849Z","_id":"070baf38-cf34-4e33-b660-f19c1e1f94e0","text":" .... ","userId":"3b724a41-48d3-4048-ae27-70b258cf5a72","isDue":true,"id":"070baf38-cf34-4e33-b660-f19c1e1f94e0"},"user":{"_tmp":{"quest":{"progressDelta":0.8581182997475203,"collection":1},"streakBonus":2.2003776672580018,"drop":{"value":3,"key":"PandaCub","type":"Egg","dialog":"You've found a Panda Cub Egg!"}},"stats":{"buffs":{"str":0,"int":0,"per":85,"con":130,"stealth":0,"streaks":false,"snowball":false,"spookySparkles":false,"shinySeed":false,"seafoam":false},"training":{"int":0,"per":0,"str":0,"con":0},"hp":49.7,"mp":226.45905405405406,"exp":1085.674399511665,"gp":94.33192009991716,"lvl":72,"class":"healer","points":0,"str":0,"con":0,"int":36,"per":36,"toNextLevel":2160,"maxHealth":50,"maxMP":294},"_id":"3b724a41-48d3-4048-ae27-70b258cf5a72"},"webhookType":"taskActivity"}","method":"POST"},"statusCode":200,"statusMessage":"OK"},"timestamp":"2019-06-26T20:53:43.058Z","level":"error","message":"ParseError: Unexpected token O in JSON at position 0 in "https://habitica-monster-api.herokuapp.com/webhooks/habitica": \nOK...\n at EventEmitter.emitter.on (/usr/src/habitrpg/node_modules/got/source/as-promise.js:65:26)\n at process._tickCallback (internal/process/next_tick.js:68:7)"}

@Alys
Copy link
Contributor

Alys commented Jul 2, 2019

More information from Aerilita:

"Regarding 'equipping the nonexistent pet instead of re-hatching', I just tried to sync using the Habitica's sync button before re-hatching, and that doesn't help either. Naturally I understand that hard-reload would be a safe choice, just wanted to try since it was mentioned in the issue."

@SabreCat SabreCat added status: issue: sprint Reserved for a dev sprint and removed help wanted labels Nov 1, 2019
@SabreCat SabreCat added help wanted and removed status: issue: sprint Reserved for a dev sprint labels Nov 25, 2019
@Alys
Copy link
Contributor

Alys commented Mar 28, 2020

I've tested the bug described in the top post and it's still happening for me as written there.

We also have a new bug report from @Altariel (be317a32-c027-4032-bbd5-25ccb21eb912) of behaviour that's not quite the same but is similar enough that it probably requires the same fix:

"On the website, when I feed a pet and it turns into a mount, I can click it the hatching potion+egg to hatch a new pet, which stays unequipped as it was. But if I then feed a second pet and it turns into a mount, clicking the hatching potion+egg does nothing and I have to reload the page before I can click the hatching potion+egg to hatch a new pet, which then automatically equips itself. ... I'm using Avast Secure Browser"

@Alys
Copy link
Contributor

Alys commented Mar 30, 2020

@Altariel made this update today:

"I had enough food to raise two pets to mounts, but I stayed in Avast Secure Browser and paid special attention to what happened, and everything worked as intended. I know the issue I described before happened then and other times in the past, but I figured I should mention that it hadn't this time."

So it's clearly an intermittent bug (which is what I'd expect since we haven't seen other reports of it).

@Alys
Copy link
Contributor

Alys commented Apr 6, 2020

A related problem from @Acorn_Sprout (2a5618da-d8c4-4530-a943-3fa871ef4859): "Some of the time after I've tamed a pet I can click on the resultant egg+potion to get the next pet. Other times (at this moment, with my Skeleton Pig) when I click on the square the page just [syncs] but does not create the pet."

@Alys
Copy link
Contributor

Alys commented Nov 3, 2020

Another report of this from @Alexa_Trebek (0e03930c-f4d3-4d21-9791-583de390043b):

"... I should report that I don't actually "own" the ruby tiger pet that I currently have equipped. I just leveled that pet up to a mount and had accidentally double clicked the faded out pet form as I started to scroll up my screen. The pet form still equipped to my avatar, and even when I refreshed the page, the pet stayed equipped even though I shouldn't have it."

I confirmed that they had the pet equipped even though they don't own it.

@Alys Alys changed the title Feeding pet to mount status and then rehatching does not rehatch, but does equip the pet Feeding pet to mount status and then rehatching/selecting incorrectly equips the pet Nov 3, 2020
@megansearles
Copy link
Contributor

Hi, can I take this issue?

@CuriousMagpie
Copy link
Member

@megansearles You sure can and with our thanks!

@megansearles
Copy link
Contributor

Have there been any more reports of issues of this type since 2020? I haven't been able to reproduce any of these yet (though I know that doesn't mean it's not still an issue), so I thought it might be useful if it were possible to see a more recent example too

@Nakonana
Copy link
Contributor

Nakonana commented Mar 13, 2022

It is still happening for me on Win 10 Firefox 97.0.1 (64-Bit). But I don't see any errors in the console. I just replicated it a few minutes ago with my Thunderstorm Cactus and Thunderstorm Panda, but the issue didn't happen with my Thunderstorm Fox 🙃. Possible considerations for replication:

For the cactus, I clicked to rehatch immediately, without waiting for the purple bar at the top to fully load/complete the feeding process before rehatching. This unequipped my Glass Dragon and equipped the cactus.

(I think, I did a refresh between those two? I definitely opened a new Habitica Inventory/Items tab to check if I have more magic potions to test for the bug another time because of the lack of console errors.)

For the panda, I waited for the purple bar to load completely after feeding the panda/before attempting to rehatch. This unequipped the Glass Dragon, but did not equip the panda.

Equipped my Glass Dragon back without refreshing or opening any new Habitica tabs. Then went for another replication attempt with the Thunderstorm Fox. I didn't wait for the purple bar to load, like with the cactus. The fox rehatched and my Glass Dragon is still equipped.

Edit: Closed the Stable tab, went to the Inventory tab and accessed the stable there. I saw an unfed Thunderstorm Panda pet and refreshed. Now it was a rehatched panda, but the Thunderstorm Cactus was not rehatched (yet, it got equipped during my testing??? 🙃) . At least the fox appears to be well-fed and rehatched.

@megansearles
Copy link
Contributor

@Nakonana Thank you so much!! For each of these examples, did you own the necessary eggs and hatching potions? Also, do you have the preference set to not show popups when hatching or raising a pet to a mount?

@Nakonana
Copy link
Contributor

@megansearles you're welcome 👍.

Regarding your questions:

  • I did own all potions and eggs.
  • No popups for me :)

@SabreCat
Copy link
Member

@megansearles are you still working on this?

@megansearles
Copy link
Contributor

Hi @SabreCat ! Yes, sorry for the period of inactivity. Just getting settled in after moving cross country, but now I have my computer stuff set back up!

@megansearles
Copy link
Contributor

Hi again @SabreCat, I actually should probably find a different bug to work on. I've spent many hours on this one, but haven't been able to reproduce it yet

@CuriousMagpie
Copy link
Member

Thanks for letting us know, @megansearles! I've removed you and re-tagged this as help wanted. Let us know if you find a different issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants