Page 2 of 3
Re: URL specification change LC8.1 to LC9.x
Posted: Mon Jan 20, 2020 4:04 pm
by sritcp
Klaus wrote: Mon Jan 20, 2020 3:39 pmdo not use:
Code: Select all
...
## put URLendcode(it) into tTemp
## Try with:
replace SPACE with "%20" in tTemp
...
These are different!
Klaus:
I can do that, but URL has no spaces (the filename is A101.pdf and I take care not to use any spaces in my folder names).
What happens if you open that PDF right in SAFARI?
The file opens with no problems! (The pdf file was made in Pages, but as my previous post shows, even a pdf from Adobe website breaks it!)
Sri
Re: URL specification change LC8.1 to LC9.x
Posted: Mon Jan 20, 2020 4:23 pm
by Klaus
sritcp wrote: Mon Jan 20, 2020 4:04 pmThe file opens with no problems!
And do you see the 4 buttons:
- (Zoom out)
+ "(Zoom in)
Open in Preview
Download
at the bottom of the PDF in SAFARI?
If yes, then Acrobat does not hook into your "webview".
Bugreport Acrobat Reader and Browser Widget:
https://quality.livecode.com/show_bug.cgi?id=22534
Re: URL specification change LC8.1 to LC9.x
Posted: Mon Jan 20, 2020 4:54 pm
by sritcp
Hi Klaus:
When move the cursor to the bottom of the screen in Safari (with pdf file open),
the image with 4 options pops up (see attached). So, it is not Acrobat.
Sri.
Re: URL specification change LC8.1 to LC9.x
Posted: Mon Jan 20, 2020 5:11 pm
by Klaus
OK, just wanted to be sure!
Re: URL specification change LC8.1 to LC9.x
Posted: Mon Jan 20, 2020 5:21 pm
by sritcp
Hi Klaus:
I had mentioned in an earlier post that when I opened
https://www.adobe.com/support/products/ ... xplain.pdf
in Safari, copied the URL and pasted it in the URL field of the browser widget, and changed from edit to run mode, LC crashed.
Does that happen to you, or are you able to load an pdf from the web without any problem?
Sri
Re: URL specification change LC8.1 to LC9.x
Posted: Mon Jan 20, 2020 5:32 pm
by Klaus
I can load that Adobe PDF into a browswer widget without any problem:
Code: Select all
on mouseUp
set the url of widget 1 to "https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf"
end mouseUp
Re: URL specification change LC8.1 to LC9.x
Posted: Mon Jan 20, 2020 6:49 pm
by jacque
I had a related issue yesterday. SpecialFolderPath preceeds the URL with a slash, so if you use "file://" in the URL you get three slashes at the front. This worked fine on Mac, Android, and in the iOS simulator (which uses Mac file paths) but failed on a real iPhone. To fix it I needed to use "file:" with no slashes. I'm loading an html file from disk into the browser widget but the general idea should be the same.
Re: URL specification change LC8.1 to LC9.x
Posted: Mon Jan 20, 2020 8:46 pm
by sritcp
I have tried the following:
1. "/Users/JohnDoe/MyData/A101.pdf"
2. "file:///Users/JohnDoe/MyData/A101.pdf"
3. "file:/Users/JohnDoe/MyData/A101.pdf"
4. Running each of the above through URLencode()
5. Running each through replace " " with "%20"
In all cases, LC9.5.1 on MacOS10.14.6 crashes.
* The problem pertains only to pdf files.
Setting the URL to an html page on the web, or setting the htmlText of widget "Browser" to a local html file works.
* The problem pertains only LC9.5.1
LC8.1 loads these same pdf files with no problem
* The problem pertains to my Mac, not Klaus's
This is annoying! This means there is something on my computer that is messing with pdf file loading. Acrobat Reader is not my default pdf loader; No Adobe program is running. I have Adobe Creative Cloud installed on my computer. May be there are some Adobe CC files running in the background which are causing this problem
Is there any way of debugging what actually happens between when the URL is set and LC crashes out?
Thanks,
Sri
Re: URL specification change LC8.1 to LC9.x
Posted: Mon Jan 20, 2020 8:52 pm
by FourthWorld
sritcp wrote: Mon Jan 20, 2020 8:46 pm
I have tried the following:
1. "/Users/JohnDoe/MyData/A101.pdf"
2. "file:///Users/JohnDoe/MyData/A101.pdf"
3. "file:/Users/JohnDoe/MyData/A101.pdf"
4. Running each of the above through URLencode()
5. Running each through replace " " with "%20"
If you open the PDF in your browser, what URL does it show?
Re: URL specification change LC8.1 to LC9.x
Posted: Mon Jan 20, 2020 9:04 pm
by LCMark
Most likely it is Acrobat Reader which is being loaded by the (system) WebView used by LC - Safari does (and always has) done its own thing (i.e. WebViews you get in apps is not Safari - not necessarily even the same system 'WebKit' framework underneath!).
The reason I think this is because:
https://quality.livecode.com/show_bug.cgi?id=22534
In terminal do:
Code: Select all
open ~/Library/Internet\ Plug-Ins/
And see if there's anything Adobe-looking in there.
Re: URL specification change LC8.1 to LC9.x
Posted: Mon Jan 20, 2020 9:27 pm
by sritcp
FourthWorld wrote: Mon Jan 20, 2020 8:52 pm
If you open the PDF in your browser, what URL does it show?
file:///Users/MyName/PiaData/activities/A101.pdf
Re: URL specification change LC8.1 to LC9.x
Posted: Mon Jan 20, 2020 9:32 pm
by sritcp
LCMark wrote: Mon Jan 20, 2020 9:04 pm
In terminal do:
Code: Select all
open ~/Library/Internet\ Plug-Ins/
And see if there's anything Adobe-looking in there.
I did; it opened the Internet Plug-Ins window; no Adobe items. In fact, the only entry is "Dish Anywhere Player.plugin"!
Re: URL specification change LC8.1 to LC9.x
Posted: Mon Jan 20, 2020 9:46 pm
by matthiasr
sritcp wrote: Mon Jan 20, 2020 9:32 pm
I did; it opened the Internet Plug-Ins window; no Adobe items. In fact, the only entry is "Dish Anywhere Player.plugin"!
Hi,
could please in terminal do
I have the same problem and in my case i found 3 "Adobe-looking" files in /library/Internet Plug-Ins/:
AdobeAAMDetect.plugin
AdobePDFViewer.plugin
AdobePDFViewerNPAPI.plugin
I´ve moved the AdobePDFViewer... files to the folder "Disabled Plug-Ins".
I´ve then restarted LC and i did not run into the problem anymore.
Re: URL specification change LC8.1 to LC9.x [RESOLVED]
Posted: Mon Jan 20, 2020 11:16 pm
by sritcp
Matthias:
It worked!
By the way the terminal command only shows the plug-ins in the user library.
So, I did not see these Adobe plug-ins the first time.
I used the Finder to go to System Library/ internet plugins folder and there they were!
(I do wonder whether this problem will occur if a user of the app has these plugins installed on their computer? If so, that would put a serious crimp on using the browser widget in standalone apps)
Thanks everyone for your help! This one ran me around for a while!
Regards,
Sri
Re: URL specification change LC8.1 to LC9.x [RESOLVED]
Posted: Tue Jan 21, 2020 12:00 am
by matthiasr
By the way the terminal command only shows the plug-ins in the user library.
Correct, the terminal command Mark asked you to run opened the folder in the user library,
while the command i asked you to run should have opened the folder in the system library folder.
(I do wonder whether this problem will occur if a user of the app has these plugins installed on their computer? If so, that would put a serious crimp on using the browser widget in standalone apps)
Unfortunately this is currently the case, but as Mark mentioned there is already a report for it in the Quality Center which is already confirmed.
https://quality.livecode.com/show_bug.cgi?id=22534
I´ve added the information about the .plugins to it.
You could add your e-mail adress there to get informed about the progress.
Regards,
Matthias