"Blocked Action" error when using Adibags for Bank Only
Hinkyz opened this issue · 7 comments
Addon Version
1.10.7
World of Warcraft Version
Retail
Describe the bug
I encounter the below error message when using Adibags with only the Bank bags enabled (backpack unticked)
"Adibags has been blocked from an action only available to the Blizzard UI. You can disable this addon and reload the UI."
Shows when right clicking on usable items in the inventory.
The issue only seems to happen when the "Enabled Bags" option has "Backpack" unticked.
I also do not ecounter this error message when Adibags is disabled.
Steps:
Log in next to mailbox.
Open all bags
Right click Dalaran Hearthstone from Bags. (Should start casting normally)
Move to cancel the cast
Close all bags.
Right click on mailbox.
Move far enough away from mailbox so that the mailbox window and bags all close automatically.
Open all bags
Right click Dalaran Hearthstone from Bags.
Error should then appear
Verification
- I have disabled all other addons and made sure this bug is triggered only with AdiBags enabled
I just tried this while in flight from Oribos to Bastion, turning off backpack. Works fine. Perhaps you need to tell us more of the steps needed to reproduce this.
It doesn't seem to happen when any of my characters are first logged in to, so that's why I recommend that the character may need to be played for a few minutes before the error shows.
Other than that, I've not noticed anything specific that causes this to start to happen.
Are you in particular places? Does it only happen at the bank or a vendor? Does it happen when using specific items? How recently were you in combat or changed zones? Try to narrow down what triggers it.
Alright I think I've managed to narrow it down to being mailbox related.
I've been able to reproduce on 5 different characters, all with no addons apart from Adibags being active.
All characters also had Backpack unticked in options.
Steps:
- Log in next to mailbox.
- Open all bags
- Right click Dalaran Hearthstone from Bags. (Should start casting normally)
- Move to cancel the cast
- Close all bags.
- Right click on mailbox.
- Move far enough away from mailbox so that the mailbox window and bags all close automatically.
- Open all bags
- Right click Dalaran Hearthstone from Bags.
Error should then appear
Let me know if you're able to reproduce this, and I'll update my first comment
I got it to happen with just disabling the backpack, stepping up to the mailbox and opening it, then right clicking the Dalaran hearthstone. I didn't disable my wealth of other addons, but I don't see others in the stack dump:
Date: 2023-04-09 07:49:47
ID: 1
Error occured in: AddOn: AdiBags
Count: 1
Message: Error: AddOn AdiBags attempted to call a forbidden function (UNKNOWN()) from a tainted execution path.
Debug:
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: ?
[string "=[C]"]: UseContainerItem()
[string "@Interface/FrameXML/ContainerFrame.lua"]:1402: ContainerFrameItemButton_OnClick()
[string "@Interface/FrameXML/ContainerFrame.lua"]:1454:
Interface/FrameXML/ContainerFrame.lua:1441
Locals:
None
I found this discussion on the Blizzard EU forum that suggests that the buttons should use SetAttribute to avoid the taint issue. From that thread:
You shouldn’t add OnClick function to secure button. You should only use attributes to determine the action that the buttons does. Some spells, including some that are on items are protected meaning that only Blizzard made addons can call them directly in code. So when you try to call UseContainerItem and the spell for use on that item is protected the addon breaks.
btn:SetAttribute("item", 1,1) is enough and pretty much should work just like UseContainerItem(1,1) inside OnClick hanler. So just remove that SetScript and see if it works. You might also wanna replace 1,1 with "1,1" becasue wowpedia says the format you use is deprecated.
Side note: Whenever I visit those forums I get stuck in a page-reloading loop and figured out that I could view the thread by disabling JavaScript for eu.forums.blizzard.com. For Chrome, go to Settings | Privacy and Security | Site Settings | Content | JavaScript. Add the hostname eu.forums.blizzard.com to the list of sites not allowed to use JavaScript.