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

Adding poll choices crashes web interface #2549

Closed
tamazonx opened this issue Dec 29, 2023 · 4 comments
Closed

Adding poll choices crashes web interface #2549

tamazonx opened this issue Dec 29, 2023 · 4 comments
Labels

Comments

@tamazonx
Copy link

Steps to reproduce the problem

  1. Click option to add poll to post
  2. Click "add a choice"
  3. Profit?

Screenshot_162

Expected behaviour

A third poll option should have appeared

Actual behaviour

Interface crashed (or refreshes/resets)

Detailed description

The build we're on: "Head is now at 19e1465 Reduce CSP configuration changes with upstream (#2536)"

I was able to find the crash with the poll only happens when using the Glitch flavour. Switching to a Vanilla flavour skin or going through an app works as expected.

It does not matter if the poll options have text in them or not, and it doesn't matter if I allow multiple choices, and it doesn't matter if I set a poll duration different from the default 1 day.

Mastodon instance

indiepocalypse.social

Mastodon version

v4.3.0-alpha.0+glitch

Browser name and version

Firefox 121.0 (64-bit)

Operating system

Windows 11 Version 23H2 (OS Build 22631.2861)

Technical details

Error: [@formatjs/intl] An id must be provided to format a message. You can either:

  1. Configure your build toolchain with babel-plugin-formatjs
    or @formatjs/ts-transformer OR
  2. Configure your eslint config to include eslint-plugin-formatjs
    to autofix this issue

d@https://indiepocalypse.social/packs/js/flavours/glitch/home-a88e76ac3bb1148d67e8.chunk.js:2:480692
d@https://indiepocalypse.social/packs/js/flavours/glitch/home-a88e76ac3bb1148d67e8.chunk.js:2:271298
H@https://indiepocalypse.social/packs/js/flavours/glitch/home-a88e76ac3bb1148d67e8.chunk.js:2:278753
render@https://indiepocalypse.social/packs/js/flavours/glitch/home-a88e76ac3bb1148d67e8.chunk.js:2:1331739
Ts@https://indiepocalypse.social/packs/js/flavours/glitch/home-a88e76ac3bb1148d67e8.chunk.js:2:560678
Cs@https://indiepocalypse.social/packs/js/flavours/glitch/home-a88e76ac3bb1148d67e8.chunk.js:2:560476
kc@https://indiepocalypse.social/packs/js/flavours/glitch/home-a88e76ac3bb1148d67e8.chunk.js:2:603820
_l@https://indiepocalypse.social/packs/js/flavours/glitch/home-a88e76ac3bb1148d67e8.chunk.js:2:592025
vl@https://indiepocalypse.social/packs/js/flavours/glitch/home-a88e76ac3bb1148d67e8.chunk.js:2:591953
bl@https://indiepocalypse.social/packs/js/flavours/glitch/home-a88e76ac3bb1148d67e8.chunk.js:2:591814
il@https://indiepocalypse.social/packs/js/flavours/glitch/home-a88e76ac3bb1148d67e8.chunk.js:2:588621
ll@https://indiepocalypse.social/packs/js/flavours/glitch/home-a88e76ac3bb1148d67e8.chunk.js:2:589010
Ha@https://indiepocalypse.social/packs/js/flavours/glitch/home-a88e76ac3bb1148d67e8.chunk.js:2:529857
al/<@https://indiepocalypse.social/packs/js/flavours/glitch/home-a88e76ac3bb1148d67e8.chunk.js:2:586558

invariant (webpack:///node_modules/@formatjs/ecma402-abstract/lib/utils.js:76:14)
formatMessage (webpack:///node_modules/@formatjs/intl/lib/src/message.js:31:4)
formatMessage (webpack:///node_modules/react-intl/lib/src/components/provider.js:46:35)
formatMessage (webpack:///app/javascript/home/mastodon/live/app/javascript/flavours/glitch/features/compose/components/publisher.jsx:86:68)
kj (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:204:188)
ij (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:203:148)
null,Zf(d)?(f=!0,cg (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:292:171)
uj (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:280:391)
uj (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:280:322)
uj (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:280:179)
Ok (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:271:87)
Dk (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:273:299)
jg (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:127:104)
Ek (webpack:///node_modules/react-dom/cjs/react-dom.production.min.js:267:272)

@tamazonx tamazonx added the bug label Dec 29, 2023
@ClearlyClaire
Copy link

I am not able to reproduce this issue, which should have been fixed in #2530. Have you rebuilt the assets after updating?

@tamazonx
Copy link
Author

Hmm. The steps I run are:

git fetch glitch-soc
git checkout glitch-soc/main
git pull glitch-soc main
bundle install && yarn install
RAILS_ENV=production SKIP_POST_DEPLOYMENT_MIGRATIONS=true bundle exec rails db:migrate
RAILS_ENV=production bundle exec rails assets:precompile

Then I reload mastodon-web & my queues.

RAILS_ENV=production bin/tootctl cache clear
RAILS_ENV=production bundle exec rails db:migrate

@ClearlyClaire
Copy link

Those steps seem correct, but maybe something went wrong with assets precompilation?

Try bundle exec rails assets:clobber assets:precompile

@tamazonx
Copy link
Author

That fixed it! Thank you so, so much!

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

No branches or pull requests

2 participants