The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   OS Xperiences (http://hintsforums.macworld.com/forumdisplay.php?f=17)
-   -   Safari bug in Tiger (http://hintsforums.macworld.com/showthread.php?t=43873)

Hogster 08-26-2005 01:53 PM

Safari bug in Tiger
 
I've just upgraded to 10.4.2 from 10.3.9 and I've already encountered an irritating bug in Safari.

It won't allow me to upload files.

I tried attaching a file to an email using my MacMail account:

Safari can’t open the page.
Safari can’t open the page “http://mail.macmail.com/member/attach_add.php”. The error was: “POSIX error: Invalid argument” (NSPOSIXErrorDomain:22) Please choose Report Bug to Apple from the Safari menu, note the error number, and describe what you did before you saw this message.


my Yahoo account:

Safari can’t open the page.
Safari can’t open the page “http://attach.ukl.mail.yahoo.com/uk....ents?YY=37142”. The error was: “POSIX error: Invalid argument” (NSPOSIXErrorDomain:22) Please choose Report Bug to Apple from the Safari menu, note the error number, and describe what you did before you saw this message.


an internet message forum:

Safari can’t open the page.
Safari can’t open the page “http://www.tunein.org.uk/forum/profile.php”. The error was: “POSIX error: Invalid argument” (NSPOSIXErrorDomain:22) Please choose Report Bug to Apple from the Safari menu, note the error number, and describe what you did before you saw this message.



What's going on here? Uploading files NEVER posed a problem in Safari when under Panther ....

It works with IE on .4.2 by the way.


Any thoughts?

Cheers,


David

nkuvu 08-26-2005 02:10 PM

Quote:

Originally Posted by Hogster
Any thoughts?

Yep.

Have you submitted the bug to Apple, like the message suggests? Have you tried doing any of this with a different user account? Do you have a firewall or proxy software running?

hayne 08-26-2005 03:15 PM

Are you possibly using "Safari Enhancer" (or any other 3rd-party software that might affect Safari)?
See this page about failed uploads when using "Safari Enhancer":
http://destinyofshadow.com/blog/?p=32

Phil St. Romain 08-26-2005 03:19 PM

No problem with the second link, here, fwiw. Error messages on the others.

Hogster 08-26-2005 03:36 PM

Hi guys,

I haven't submitted the bug to Apple yet, no ... nor have I tried doing these things with another user account .... nor do I have a firewall or proxy software running! I'll submit the report and try it in another user's account ....

I'm not using any 3rd party software, although that link you supplied describes the exact symptoms I'm seeing .... sadly I can't find a link to download Safari 2.0 from or I'd have a go reinstalling it.

I take it you guys don't have similar problems with uploading things?

Phil - the links are only active properly when I'm logged into the various email/forum accounts.

Thanks all,


David

hayne 08-26-2005 04:02 PM

Quote:

Originally Posted by Hogster
I take it you guys don't have similar problems with uploading things?

None. I use Safari almost exclusively (on 10.4.2) and have never seen such a problem.
For example, I can use the "Manage Attachments" button (on the bottom of the page when you reply to a macosxhints forums post) to upload a file to these forums.
What happens when you try that?

Hogster 08-26-2005 09:42 PM

Safari can’t open the page.
Safari can’t open the page “http://forums.macosxhints.com/newattachment.php”. The error was: “POSIX error: Invalid argument” (NSPOSIXErrorDomain:22) Please choose Report Bug to Apple from the Safari menu, note the error number, and describe what you did before you saw this message.



Ho hum .... :rolleyes:

I submitted the report to Apple, but I've yet to try Safari in another user account ....

Is there any way to reinstall Safari or trash some prefs to try and alleviate this problem?

Mmm, 2:43am ... better get some sleep .... (!)

Cheers,


David

hayne 08-27-2005 12:20 AM

Quote:

Originally Posted by Hogster
I submitted the report to Apple, but I've yet to try Safari in another user account ....

Is there any way to reinstall Safari or trash some prefs to try and alleviate this problem?

Please just try it from another user account before doing anything else.
(It might have been better if you had tried that before submitting the bug report to Apple since then more information you supply about a bug, the more likely it will get fixed.)

Hogster 08-27-2005 04:59 AM

Ok, just sending this from a new user account and uploading of any and every sort works just fine!

I wonder what's causing the problem in my user account then ....

Thanks for all your help (and patience) guys - it's most appreciated! :)

hayne 08-27-2005 05:13 AM

Quote:

Originally Posted by Hogster
Ok, just sending this from a new user account and uploading of any and every sort works just fine!

I wonder what's causing the problem in my user account then ....

I'm guessing that it is some "enhancement" software that you have installed and which is only active for that one user.
In any case, here's a general procedure for fixing it:

The problem almost certainly is due to something under your home folder.
And it likely is something under ~/Library
( ~ = your home folder)
The most likely thing is a bad preference file under ~/Library/Preferences
You could start by removing the preference files for the apps you are having trouble with.
If the problem persists, you need to narrow the problem down - you could start by moving (via drag & drop) the whole "Preferences" folder that is under ~/Library to the Desktop, then log out and log in again. A default copy of the Preferences folder will have been recreated. Does that improve things? If so, you could use a divide & conquer approach to figure out which of the preference files is causing the problem - move half of the preference files back into the Preferences folder, log out & in again, etc.

If the problem persists, try the same thing with the other sub-folders of ~/Library. E.g. with ~/Library/Caches, ~/Library/InputManagers, ~/Library/Application Support, ~/Library/Fonts, contents of ~/Desktop, etc.

Hogster 08-27-2005 05:39 AM

Excellent!

I tried removing various folders from my home library including Preferences, Internet Plug-Ins, Safari and Caches. The only one of those which had an effect was the Caches folder - when I removed that the uploading worked fine once again!

So as a test I put the Caches folder back into the Library but left the Safari Cache folder out of it ... and that worked too! So presumably there's something up with that Safari Cache folder ... rather odd considering that Get Info says it takes up zero k, and it appears to be full of empty folders within folders ....

Ahh well, at least things are working now!

MANY thanks Hayne, you're a star! :)

All the best,


David

PS. I logged out each time I removed/replaced a folder ...

hayne 08-27-2005 07:39 AM

Quote:

Originally Posted by Hogster
So presumably there's something up with that Safari Cache folder ... rather odd considering that Get Info says it takes up zero k, and it appears to be full of empty folders within folders ....

The problem might have been with the permissions on those folders. Perhaps some software you had used in the past had changed the permissions on those folders to prevent Safari from caching files (e.g. as an attempt to speed it up).

Hogster 08-27-2005 08:04 AM

Good call - just checked the folder (which was still in the Trash), and it was marked Read Only! :) How come you're so clever, Hayne? :)

nkuvu 08-29-2005 12:55 AM

Quote:

Originally Posted by hayne
It might have been better if you had tried that before submitting the bug report to Apple since then more information you supply about a bug, the more likely it will get fixed.

Mixed feelings about this. The error message itself needs some work. There's no reason I know of that Safari can't provide a human-readable error message (something like Safari can’t open the page "http://forums.macosxhints.com/newattachment.php". The error was: "Unable to write to directory /foo/bar/baz"). Then it's super clear to a lot more people. The error message could also include the NSPOSIXErrorDomain message for someone who has a reference to those, but that number by itself is pretty useless to the average user.

Providing cryptic error messages is, IMHO, a bug in itself. And for a user friendly OS, OS X tends to provide a number of cryptic or extemely terse messages. So I'm looking at it as a bug in the UI, not the app.

hayne 08-29-2005 03:00 AM

Quote:

Originally Posted by nkuvu
There's no reason I know of that Safari can't provide a human-readable error message (something like Safari can’t open the page "http://forums.macosxhints.com/newattachment.php". The error was: "Unable to write to directory /foo/bar/baz").

I agree. There is no reason why it can't provide such an error message. However, it undoubtedly would be more trouble for the Safari programmers to do this. Often it is awkward in programming to pass error messages back and forth between different levels of the program. (e.g. the caching may be handled by a different module than the uploading per se).
And the Safari programmers might well be justified in not bothering to check on the permissions of folders (the cache folders) that Safari itself created. I.e. I think they can justifiably consider that these cache folders are an "internal" part of Safari, and so if anyone fiddles with them (e.g. changing their permissions) then they deserve what they get.

Sure, it would be better if the programmers made Safari a bit more resilient in the face of unexpected circumstances. But nothing comes for free. Doing so would likely incur larger development costs and/or delays.

nkuvu 08-29-2005 10:49 AM

Quote:

Originally Posted by hayne
I agree. There is no reason why it can't provide such an error message. However, it undoubtedly would be more trouble for the Safari programmers to do this. Often it is awkward in programming to pass error messages back and forth between different levels of the program. (e.g. the caching may be handled by a different module than the uploading per se).

All part of writing a decent user interface, IMO. If you (general you, that is) saw an option in the preferences that was labeled "yes" then I'd hope you'd want more information. Especially if the operation of said option wasn't clear by checking the little box. Yes it would be more work, but since I doubt Apple has one person working on Safari I don't think it's an unrealistic expectation. Maybe they just haven't gotten to it yet, which is fine, as long as it's something they've noted for future improvement.
Quote:

And the Safari programmers might well be justified in not bothering to check on the permissions of folders (the cache folders) that Safari itself created. I.e. I think they can justifiably consider that these cache folders are an "internal" part of Safari, and so if anyone fiddles with them (e.g. changing their permissions) then they deserve what they get.
But there are a lot of cases of bad installer programs changing permissions, not the user. Thus the entire repair permissions option in disk utility. In this case I doubt the user changed permissions intentionally, so "deserving what they get" isn't really fair.
Quote:

Sure, it would be better if the programmers made Safari a bit more resilient in the face of unexpected circumstances. But nothing comes for free. Doing so would likely incur larger development costs and/or delays.
Of course it would. Even the most trivial changes unfortunately require a ton of documention changes, testing, analysis by designers, et cetera. The larger the project, the more difficult it is to make these "simple" changes.

I do still consider this a wish list item for a future version of Safari (and all other programs, for that matter). One of the reasons I use a Mac is for its exceptional user interface, and it bothers me when one portion of Apple-designed and written programs fails the most basic of UI guidelines. Namely, provide informative error messages. But the original poster has a working solution, so I won't ramble on in the thread any more about it. :)

hayne 08-29-2005 12:13 PM

Quote:

Originally Posted by nkuvu
I don't think it's an unrealistic expectation. Maybe they just haven't gotten to it yet, which is fine, as long as it's something they've noted for future improvement.

I agree with you in principle - but it's just a matter of priorities. You can help Apple to set its priorities by giving them feedback:
http://www.apple.com/macosx/feedback/

Quote:

But there are a lot of cases of bad installer programs changing permissions, not the user. Thus the entire repair permissions option in disk utility. In this case I doubt the user changed permissions intentionally, so "deserving what they get" isn't really fair.
Actually, I suspect (as I said above) that the permissions got changed by some 3rd-party utility that did so with the idea of avoiding cache-lookup delays. Presumably the user ran this utility intentionally.

One way of looking at this issue is whether application programmers should consider their app existing in a "friendly" or "unfriendly" environment. In a "friendly" environment, an app wouldn't have to worry about some other app coming in and changing some "internal" detail like the permissions of cache folders. In an "unfriendly" environment, nothing can be depended on. Security issues arise from an "unfriendly" environment. But programming in the paranoid manner necessary to make your application secure in an "unfriendly" environment is often an expensive development practice. It is usually confined to the areas known to be unfriendly - e.g. network interactions.

An installer program for some unrelated application that changed permissions on Safari's cache folders would count as an extremely unfriendly program - akin to malware.

styrafome 09-29-2005 02:29 AM

Thank Google for finding me this thread. I had this error and it's Safari Enhancer's fault, on my machine anyway.

rrraven 07-24-2006 02:12 PM

Summary: The simple instructions
 
I've had the same problem, and with the help of this forum have resolved it. Here's the simple summary, condensed from Hogster's description of his troubleshooting in response to other posters' suggestions.

In your home,
Go to Library/Caches.

Probably you will discover that the Safari folder in there has a little padlock on the icon, indicating it is locked. This may have been done by Safari Enhancer or something else, to prevent caching and speed things up. But it interferes with certain uploading processes (my troubles were always with uploading photos to photo websites).

Select the Safari folder (inside ~/Library/Caches), and hit Apple-I (for GetInfo). Uncheck the "Locked" checkbox.

Problem should be solved! I did not find it necessary to logout and back in. Simply unchecking that one box was a complete fix for a problem that had been nagging me for months! Thanks, hogster and everyone!

DillyDally 01-09-2007 08:39 PM

Thanks so much for this thread.

I found an "alias Safari" in my caches folder, removed it, logged out and logged back in. A default Safari folder appeared in caches and everything works fine.

Big ups to Hayne for the easy-to-follow info!!!
P.S. I had been running "SafariSpeed" once in awhile..?..

mtpalms 03-27-2008 11:27 PM

I'm glad I found this thread so quickly. I'm running 10.4 and Safari 3. I tried removing the cache folder and logging out, but it didn't work. My Safari Cache folder was locked. I did a Get Info, unlocked the folder, and I was good to go!


All times are GMT -5. The time now is 06:52 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.