While I get the joke. This just means the previous line was the bad one. Lol usually the end of the line. (For those that may not understand it and get confused)
This was my feeling today when i got error "provided string, expected string". Usually these kinds of errors are pretty clear like "provided number, expected array" (the language only has one type of number type hense "number" instead of "int" for example), when providing wrong type as method parameter.
Still have no idea what that error meant. Also it's modification code for existing program so no ide hints and just that error message withing the program.
When I was a junior I once had a if else that executed code in both the if and else. I thought I was going crazy. I explained to a senior what was going on and he said I was definitely wrong. He ran my code, saw it going into both the if and else (debugger, prints, etc) and decided my computer was haunted and I should burn it. Restarting my computer ended up fixing the issue, but that was the most bizarre issue I've ever run into
Jokes aside, I'm actually curious about this. I work with python and js, and I've never encountered an error like this (indicating a problem in a line that doesn't exist). Does this really happen? Is this an old language thing that's become a joke, or am I just lucky I've never encountered anything like this?
It’s usually the code reporting the error isn’t exactly the same code you’re looking at. First thing I do is check my current branch, then think through how things can be cached
Yeah it really happens. I see a bunch of comments giving possible reasons, but because no one definitively stated exactly why, it's still on the board. I always thought it was because the cache in the editor hadn't been updated yet... Idk though. Usually it gets close enough though to see what's going on
Problem with a sourcemap, a file which "maps" the minified JavaScript with the original source - so it tells you the original line, not line 1 column 90000.
Usually this doesn't break, but it can when the sourcemap is made for an older version of the file and stays in cache as a bug. So there might have been code on that line before.
This is one of those things that's funny for starting folk. With any reasonable IDE there's a link directly to the line. Also it's usually only a problem after you do some changes and the lines vary and using the old links point to nonsense. Such as when doing lint fixes.
425
u/Varderal Sep 12 '25 edited Sep 12 '25
While I get the joke. This just means the previous line was the bad one. Lol usually the end of the line. (For those that may not understand it and get confused)
80
u/UnreasonableEconomy Sep 12 '25
Thank you OP! But our errors are in another directory!
46
u/Arctos_FI Sep 12 '25
This was my feeling today when i got error "provided string, expected string". Usually these kinds of errors are pretty clear like "provided number, expected array" (the language only has one type of number type hense "number" instead of "int" for example), when providing wrong type as method parameter.
Still have no idea what that error meant. Also it's modification code for existing program so no ide hints and just that error message withing the program.
12
u/Snipen543 Sep 12 '25
When I was a junior I once had a if else that executed code in both the if and else. I thought I was going crazy. I explained to a senior what was going on and he said I was definitely wrong. He ran my code, saw it going into both the if and else (debugger, prints, etc) and decided my computer was haunted and I should burn it. Restarting my computer ended up fixing the issue, but that was the most bizarre issue I've ever run into
9
u/electric_anteater Sep 12 '25
You ran the code without actually recompiling
7
u/Guigzzt Sep 12 '25
Jokes aside, I'm actually curious about this. I work with python and js, and I've never encountered an error like this (indicating a problem in a line that doesn't exist). Does this really happen? Is this an old language thing that's become a joke, or am I just lucky I've never encountered anything like this?
3
u/[deleted] Sep 12 '25 edited Nov 01 '25
squeeze bedroom innocent quaint hungry mighty include deer bike steep
This post was mass deleted and anonymized with Redact
3
u/Western-Alarming Sep 12 '25
As a person that uses nix, a embarrassing amount of times is because I forgot to put a ;
3
u/RRumpleTeazzer Sep 12 '25
Thank you, Mario!
But the problem was in another file.
3
u/Hungry_Eye477 Sep 13 '25
There might be a special character can’t be shown by the IDE!
2
u/Mucksh Sep 13 '25
At least you get the line. In c or c++ a missing
)usually results in the compiler saying that every thing is wrong and throwing 500 errors2
u/Firm-Can4526 Sep 13 '25
Watch for preprocessor lines that get taken out. Sometimes that is the reason
2
u/deluxe57 Sep 13 '25
Repost #7145489
2
u/Colon_Backslash Sep 12 '25
This is one of those things that's funny for starting folk. With any reasonable IDE there's a link directly to the line. Also it's usually only a problem after you do some changes and the lines vary and using the old links point to nonsense. Such as when doing lint fixes.
2
u/magicman_coding Sep 12 '25
The curse of tabbing your code
1
u/YellowCroc999 Sep 12 '25
I feel like nobody ever even has these anymore.
1
u/thanosthepro Sep 12 '25
i would try to put a comment on that line
1
u/Fuzzy_8691 Sep 12 '25
Lol I hate when this happens!
1
u/Ice_HRZDn Sep 13 '25
Code is 1000 line long. Error at line 25. Line 25 is comment.
1
u/denesh07 Sep 13 '25
}:
1
u/fschaupp Sep 13 '25
pl/sql user like: Where is the empty line without a comment...
1
u/Accurate-Data-7006 Sep 14 '25
This hurts my brain every time
1
u/99percentcheese Sep 14 '25
Once had an error on line 482. Turns out that line had an open bracket I was supposed to close on line 537 but I didn't
1
u/ahm_1313 Sep 14 '25
1
u/Antiprimary Sep 14 '25
How does this repost keep getting upvotes every day
1
u/itsJuni01 Sep 15 '25
LOL
1
u/TheTerraKotKun Sep 16 '25
Maybe it's just a Python syntax problem...
1
u/AaronTheElite007 Sep 16 '25
So you're saying the error is anywhere between lines 1 and 264... Thanks.
1
u/joost00719 Sep 12 '25
I'm guessing 264 has to be }); instead of };