exception_notification icon indicating copy to clipboard operation
exception_notification copied to clipboard

code converter not found (UTF-8 to UTF-16)

Open Shinta opened this issue 14 years ago • 12 comments

I think this issue is fixed in the version 3.0, but is happening to me right now, I love Exception Notification, can some one tell me what can i do?

Shinta avatar Nov 22 '12 05:11 Shinta

I had this same problem using jruby 1.7.0. Which generated an interesting (hundreds of jruby internal lines of stacktrace) exception:

ActionView::Template::Error (Illegal replacement):
  java.nio.charset.CharsetEncoder.replaceWith(CharsetEncoder.java:285)

This line in the default /views/exception_notifier/exception_notification.text.erb view is throwing the exception:

sections = sections.force_encoding('UTF-8').encode('UTF-16', :invalid => :replace).encode('UTF-8') if sections.respond_to?(:force_encoding)

I just copy/pasted the view into my normal application directory under app/views/exception_notification.text.erb with that line removed. Hope that helps!

etorrey avatar Nov 27 '12 16:11 etorrey

check issues 103 and 111

murtyk avatar Dec 17 '12 17:12 murtyk

#103 is closed, but I'm still experiencing this issue. I'm using Ruby 1.9.3 on Heroku Cedar. As suggested on Stack Overflow the fork by @alanjds makes the problem go away.

Sjors avatar Dec 31 '12 06:12 Sjors

That said, when I do: brew link --overwrite sphinx

it doesn't complain and Sphinx works fine (and it uses MySQL).

Sjors avatar Dec 31 '12 11:12 Sjors

I got the latest code including fixes for #103 and #111 but I am still getting the error mentioned by @etorrey under jRuby 1.7.0. Removing the line as mentioned by @etorrey works.

san avatar Jan 08 '13 18:01 san

I get this error too.

oveddan avatar Jan 11 '13 03:01 oveddan

You need to use the version from github as the fix is in the code but not released in a gem yet. See #111.

rywall avatar Jan 14 '13 22:01 rywall

i've used gem from github but still have been afected by this bug (with jruby 1.7.2)

danil-z avatar Jan 15 '13 14:01 danil-z

The JRuby issue is a different issue. There is a bug in JRuby which makes .encode('UTF-16', :invalid => :replace) fail in 1.9 mode. Unfortunately, the JRuby devs have indicated a fix for this is difficult.

@smartinez87 I have been fiddling around trying to change exception_notification to not trigger this bug in JRuby. It's easy enough to simply not go through the multiple conversion steps, but obviously they are there to fix issues #52 and #86.

But I have been unable to reproduce the exception seen in those issues. I've tried adding various tests that include UTF-8 check marks forced to UTF-8, ASCII-8BIT, etc. I've tried setting the dummy app to not default to "utf-8". Is there any known way to reproduce these issues? I'd really like to get exception_notification working in JRuby, but I'm guessing a pull request that simply ripped out the encoding pipeline would be rejected.

Thank you.

pmahoney avatar Jan 30 '13 19:01 pmahoney

I agree with @pmahoney: this fixes MY problem only. Have no tests attached, and for sure it breaks non-standard Ruby VM or non-x86 archtectures.

Beware!

Someone with more Ruby knowledge please write at least some basic tests, so people can say where it works/breaks. Its far from my field now.

alanjds avatar Feb 09 '13 21:02 alanjds

And now I got incompatible character encodings: ASCII-8BIT and UTF-8 on version 4.0.1. Let's switch it again :-p . I'll try to see what causes this and maybe find an easy way to reproduce.

jimmykarily avatar Aug 18 '14 07:08 jimmykarily

Hi!

I'm doing some bug triage and I would like to know if this bug is still happening on master.

The idea is to close those errors that can't be reproduced or that don't have enough information to reproduce it. I'll revisit this bug in a week and I'll close it if there's no more information. It can be opened again later if necessary.

Thanks!

san650 avatar Dec 14 '15 21:12 san650