views:

595

answers:

5

My app have an UIWebView and I open a twitter oauth page with it.

when I open oauth page , it works well.

after I sign-in, it redirects to another page which have PIN code.

and It crashes down with logs below.

Is it a bug in 4.0 SDK?

2010-06-14 22:55:11.159 AllFx[1435:2003] -[DOMHTMLElement setHref:]: unrecognized selector sent to instance 0x74e4040
2010-06-14 22:55:11.162 AllFx[1435:2003] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[DOMHTMLElement setHref:]: unrecognized selector sent to instance 0x74e4040'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x02b6c919 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x02cba5de objc_exception_throw + 47
    2   CoreFoundation                      0x02b6e42b -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
    3   CoreFoundation                      0x02ade116 ___forwarding___ + 966
    4   CoreFoundation                      0x02addcd2 _CF_forwarding_prep_0 + 50
    5   DataDetectorsUI                     0x0bde8ac4 -[WebTextIterator(DDExtensions) dd_doUrlificationForQuery:forResults:document:DOMWasModified:URLificationBlock:] + 1731
    6   DataDetectorsUI                     0x0bde2f09 -[DDOperation _doURLificationOnDocument] + 341
    7   DataDetectorsUI                     0x0bddff9c -[DDDetectionController _doURLificationOnWebThreadAndRelease:] + 563
    8   CoreFoundation                      0x02add42d __invoking___ + 29
    9   CoreFoundation                      0x02add301 -[NSInvocation invoke] + 145
    10  WebCore                             0x039fa2b3 _ZL15HandleAPISourcePv + 147
    11  CoreFoundation                      0x02b4dd7f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
    12  CoreFoundation                      0x02aac2cb __CFRunLoopDoSources0 + 571
    13  CoreFoundation                      0x02aab7c6 __CFRunLoopRun + 470
    14  CoreFoundation                      0x02aab280 CFRunLoopRunSpecific + 208
    15  CoreFoundation                      0x02aab1a1 CFRunLoopRunInMode + 97
    16  WebCore                             0x039943c3 _ZL12RunWebThreadPv + 483
    17  libSystem.B.dylib                   0x98552a19 _pthread_start + 345
    18  libSystem.B.dylib                   0x9855289e thread_start + 34
)
terminate called after throwing an instance of 'NSException'
A: 

i'm seeing the same thing with an update to 4.0. anybody find a solutions? (can't just add www. ;-))

rooster
I went with "www." to see if I can narrow down the conditions for the NSException. The "www." was really a sanity check and a very temporary solution. I had to demo the code and crashing wasn't a desired output. ;-)
mrwes
+2  A: 

I got'it this might have problem with auto generating link.

turn off all detection of your UIWebView. In my case, detection of phone numbers is issues.

may the force be with you :D

hytgbn
A: 

Yeah, deactivating the detection of phone numbers did work!

Great Thanks!

floxxxy
A: 

Deactivating detection of links did it for me in the UIWebView! I tried phone numbers first and that wasn't enough. Very strange.

bazscott
A: 

I had exactly the same problem and, in my case, deactivating the phone number ditation did work.

webView.dataDetectorTypes = UIDataDetectorTypeLink;

Very strange issue.... Thanks for the post.

Kura