NoMethodError

Posted under General

Xiaohongshu video uploader seems a bit busted right now. Catches me in an endless loop, and when I do get an upload, I get met with this "NoMethodError" issue:

NoMethodError exception raised
app/logical/source/extractor/xiaohongshu.rb:88:in 'Source::Extractor::Xiaohongshu#page'
app/logical/source/extractor/xiaohongshu.rb:93:in 'Source::Extractor::Xiaohongshu#page_json'
app/logical/source/extractor/xiaohongshu.rb:84:in 'Source::Extractor::Xiaohongshu#note'
app/logical/source/extractor/xiaohongshu.rb:80:in 'Source::Extractor::Xiaohongshu#user_id'
app/logical/source/extractor/xiaohongshu.rb:41:in 'Source::Extractor::Xiaohongshu#profile_url'
app/logical/source/extractor.rb:197:in 'Source::Extractor#profile_urls'
app/logical/source/extractor.rb:298:in 'Source::Extractor#artists'
app/models/post.rb:132:in 'Post.new_from_upload'
app/controllers/uploads_controller.rb:33:in 'UploadsController#show'
app/logical/rack_server_timing.rb:19:in 'RackServerTiming#call'

I have no idea what's going on, but it is really annoying.

It's not limited to videos. Uploading any image link starting with https://ci.xiaohongshu.com/ is also failing. The issue appears to have started after the most recent site update (2026-06-18 12:12:27 +0000).

nonamethanks said in forum #450602:

Try again now please. What urls are you trying to upload?

There was a recent change that attempted to fix rednote issues, but it might have broken other stuff we didn't have tests for.

https://github.com/danbooru/danbooru/blob/16d27c0c0f3ef8c521711e581aa090081c9bd97d/app/logical/source/extractor/xiaohongshu.rb#L88

Problem is missing & here (page_url is nil so parse(page_url) returns nil). We have tests but seems they weren't ran.

nonamethanks said in forum #450602:

Try again now please. What urls are you trying to upload?

There was a recent change that attempted to fix rednote issues, but it might have broken other stuff we didn't have tests for.

https://sns-video-bd.xhscdn.com/pre_post/1040g0cg31p846hi32ar05n33tu9klnoss4fa3uo
https://ci.xiaohongshu.com/notes_pre_post/1040g3k0321i4ptp67o005noeialgbvd6sg77ef0

After uploading, these assets appear in "My Uploads", but opening them leads to a NoMethodError page.

1