FacebookAPI: HTMLViewer not loading Secure Pages? A (or few) tester(s) needed.

I have been updating the FacebookAPI classes which we have over at Xojo Developer’s Spot to support the recent changes in the Facebook API v2.4, and so far, the code works flawlessly on Linux and Windows. Mac OSX on the other-hand seems to be having an issue loading Facebook altogether. (I suspect it’s my system). At first I believed the issue to be within the framework somewhere, then I tried WebKit, and then tried Safari. For some odd reason, NO secure website (HTTPS) EXCEPT Google and Apple, will load?!?!? So I tried FireFox and a sleuth of other browsers available for Mac, to find that they had no issue whatsoever loading Facebook, or any of the associated domains via HTTPS. Everything was fine with Safari before the last OS update. So, neither the Native, nor Webkit HTMLViewer on my system presently load any needed secure site.

If someone would be willing to test the most recent update to the FacebookAPI-v2.4 demo, I’d be grateful. The Facebook app is the Xojo Developer’s Spot Demo App. All that is really needed is to run the demo, click login, and see if the authentication window even loads; you may dabble around all you want with the API’s if you desire. If you create your own Facebook app through the developer portal, you’ll need to configure the app (in Facebook) and test the demo using your own appID. Alas, that part is explained step by step in the docs not included. This is only the project demo file.

Download: http://www.xojodevspot.com/demos/FacebookAPIDemo-v2.4.xojo_binary_project

Hi Matt, the login page loads just fine for me. But after granting the permissions, it crashed like this:

Process: FacebookAPI.debug [59477]
Path: /Users/USER/Downloads/FacebookAPI.debug.app/Contents/MacOS/FacebookAPI.debug
Identifier: com.mycompany.FacebookAPI
Version: ??? (1.0.0.0.0)
Code Type: X86 (Native)
Parent Process: ??? [1]
Responsible: FacebookAPI.debug [59477]
User ID: 501

Date/Time: 2015-08-10 11:01:16.448 +0200
OS Version: Mac OS X 10.10.4 (14E46)
Report Version: 11
Anonymous UUID: 8D1D9C6D-67A6-E9BE-ACEE-B19AFE422F37

Sleep/Wake UUID: 9952CBBE-252D-4D0A-B992-30DB1E210610

Time Awake Since Boot: 410000 seconds
Time Since Wake: 1100 seconds

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000010

VM Regions Near 0x10:
–>
__TEXT 0000000000001000-00000000001e5000 [ 1936K] r-x/rwx SM=COW /Users/USER/Downloads/FacebookAPI.debug.app/Contents/MacOS/FacebookAPI.debug

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.WebCore 0x90c21c34 WebCore::ProgressTracker::progressCompleted(WebCore::Frame&) + 52
1 com.apple.WebCore 0x9011c2ab WebCore::FrameLoader::checkLoadCompleteForThisFrame() + 219
2 com.apple.WebCore 0x9011c159 WebCore::FrameLoader::checkLoadComplete() + 233
3 com.apple.WebCore 0x900cb8fa WebCore::DocumentLoader::finishedLoading(double) + 602
4 com.apple.WebCore 0x9018bfb7 WebCore::DocumentLoader::notifyFinished(WebCore::CachedResource*) + 119
5 com.apple.WebCore 0x9018bdcb WebCore::CachedResource::checkNotify() + 299
6 com.apple.WebCore 0x9018bbfa WebCore::CachedRawResource::finishLoading(WebCore::ResourceBuffer*) + 202
7 com.apple.WebCore 0x9018ba9f WebCore::SubresourceLoader::didFinishLoading(double) + 95
8 com.apple.WebCore 0x901a0f2c WebCore::ResourceLoader::didFinishLoading(WebCore::ResourceHandle*, double) + 28
9 com.apple.WebCore 0x901a0f07 -[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:] + 71
10 com.apple.CFNetwork 0x9bd36aa9 ___ZL32_NSURLConnectionDidFinishLoadingP16_CFURLConnectionPKv_block_invoke + 40
11 com.apple.CFNetwork 0x9bd35b6e __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 81
12 com.apple.CFNetwork 0x9bd35b0c -[NSURLConnectionInternalConnection invokeForDelegate:] + 131
13 com.apple.CFNetwork 0x9bd359d3 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 269
14 com.apple.CFNetwork 0x9bd3589d -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 97
15 com.apple.CFNetwork 0x9bd36a77 _NSURLConnectionDidFinishLoading(_CFURLConnection*, void const*) + 43
16 com.apple.CFNetwork 0x9bd369c0 ___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 110
17 com.apple.CFNetwork 0x9bdef3b5 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 108
18 com.apple.CFNetwork 0x9bc89e5e RunloopBlockContext::_invoke_block(void const*, void*) + 70
19 com.apple.CoreFoundation 0x995ba399 CFArrayApplyFunction + 57
20 com.apple.CFNetwork 0x9bc89d3b RunloopBlockContext::perform() + 149
21 com.apple.CFNetwork 0x9be4215a non-virtual thunk to RunloopBlockContext::multiplexerClientPerform() + 20
22 com.apple.CFNetwork 0x9bc89b28 MultiplexerSource::perform() + 326
23 com.apple.CFNetwork 0x9bc89940 MultiplexerSource::_perform(void*) + 76
24 com.apple.CoreFoundation 0x995f112f CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 15
25 com.apple.CoreFoundation 0x995e2bbd __CFRunLoopDoSources0 + 253
26 com.apple.CoreFoundation 0x995e20f2 __CFRunLoopRun + 994
27 com.apple.CoreFoundation 0x995e1aa6 CFRunLoopRunSpecific + 390
28 com.apple.CoreFoundation 0x995e190b CFRunLoopRunInMode + 123
29 com.apple.HIToolbox 0x944c28f8 RunCurrentEventLoopInMode + 262
30 com.apple.HIToolbox 0x944c2631 ReceiveNextEventCommon + 494

Thanks a million Maximilian! Dang! A nasty WebKit bug in the Xojo framework. Will try switching to Native and see if the bug still appears… Thanks for testing! Apple has yet to reply with a solution for my Safari not loading properly after updating the OS; a search in the apple forums yielded I’m one of a couple thousand, so I don’t feel so alone. :slight_smile:

I updated the download source link with the Native Apple HTMLViewer if you wouldn’t mind testing again. If that one works as intended, guess I’ll post a bug report with Xojo for WebKit.

The “native”-setting applies to windows only. On the Mac, the htmlviewer always uses webkit. Or am I missing something?

I’ll have to check. That I’m not sure of; although it would be foolish of Xojo to put Native and Webkit as an option in the Mac Inspector if it wasn’t available without being at least greyed for the platform in use. (I understand for “cross-platform” reasons…although it’s very vague for the primarily Windows users).

Update:Apparently the Xojo native (webkit falls back to native) is the only Mac option available…

Guess it’s just a really big Xojo framework bug then. At least it doesn’t plague Web Edition :slight_smile:

The authentication window code is as follows:

htmlPane.LoadURL(theurl)

on DocumentComplete

the appToken is retrieved,

and if it’s found, the window is closed.

So you experience a crash (Xojo framework issue), whereas my htmlviewer just remains blank (Mac issue). The deaf, leading the blind :slight_smile:

I will post a bug report.

Thank you for all your help in testing :slight_smile:

[quote=205800:@Matthew Combatti]I’ll have to check. That I’m not sure of; although it would be foolish of Xojo to put Native and Webkit as an option in the Mac Inspector if it wasn’t available.
[/quote]
The layout editor is used to layout things cross platform :stuck_out_tongue:
So at the time you design it you cant say definitively that it is / will be ONLY for Windows Linux or OS X since compiling for any of those targets may be selected AFTER you layout the window

[quote=205803:@Norman Palardy]The layout editor is used to layout things cross platform :stuck_out_tongue:
So at the time you design it you cant say definitively that it is / will be ONLY for Windows Linux or OS X since compiling for any of those targets may be selected AFTER you layout the window[/quote]

Ah! ok :slight_smile: I’ll forward you a copy of the source Norman. Perhaps you can verify or dismiss the bug.