External USB Seagate drive fails to load in Caja, crashes/closes it when trying to load folders/file list, but accessible through terminal

It's all there. If I boot with my 2 external seagate drives, regular small black external drives, one is 1TB the other is 2TB, I will be able to use them. But any drive connected or even my hot-swap dock for mechanical drives which has a 2TB WD in it, will mount when connected when the system is running, but Caja will not be able to display the folders/files and the just disappear (close every caja windows that might be open), doesn't crash tho, afaik.

There's been some weirdness and "Ubuntu has encountered errors Send Report Y/N" and System had a problem "Cancel/Ok" but I attribute that to skype, which I have removed and since then there isn't any issues of this sort. So I doubt that's regarding this.

Sure, I could boot with the drives plugged in already, but there's so many things plugged in that computer, at times I think I might need a more powerful PSU (verified it with my tools and it's working perfectly still, but maybe 500 watts is getting too little for that desktop, even if my usb 3.0 extension to add 4 ports (mobo only has 2, but has 16 usb 2.0 ports) is plugged using its own power, same for the hot-swap HD dock, they have their own electrical plug so the PSU is given a break anyways.

I verified the drives on my win10 desktop, well, my girlfriend's and they work fine, obviously they're NTFS and not GPT since they're not over 2TB, because they came this way when I bought them, I'm sure there could be less issues if they were ext4, but I've done all of this on a ubuntu mate 20.04 live session for a long time (I had to get a new hard drive before I could install an OS at all and I always kept pushing it away, even if this desktop is much more powerful than any other device I own. It also kind of removes the utility of the drive being external/portable to any device I might encounter and would want to plug one of those drives in, NTFS will work with anything, I keep ext4 for internal drives for the most part.

I've seen a few similar issues with 20.04 or Linux Mate whatever the number version is, Caja is the file manager attached to the MATE gui right? Maybe install an alternative file manager (that is not a nightmare to have on the side of Caja, if that's even possible, I know a long time ago with Mint, I would install the regular Ubuntu file manager because Caja was having issues and it worked, sort of, its been a while).

The system sees and can use files if programs, say vlc, is pointed directly to the path of the file on the external drive, but Caja can't handle newly plugged in drives, which is not ideal. What's happening here? I never encountered this and the few people who seem to have posted about a similar problem online, don't exactly have this issue, they say Caja crashes mostly, Caja just closes for me when the green round arrow freezes after a while when attempting to display the contents of the drive.

Sorry, but your post here is extremely cryptic (at least IMHO). Certain things need clarification.

So you boot up with these external hard drives already plugged in to the computer, and they mount and Caja reads them just fine?

So you connect another external hard drive; it automounts properly; but when Caja goes to open the newly-mounted disk, a new Caja window opens up, freezes, and then all Caja windows disappear?

Pardon my apparent attitude, but what makes you think Caja doesn't crash when all Caja windows are closed spontaneously, never to open again by themselves?

If you're even thinking about this possibility right now, it's a sign that you should enumerate how many devices you actually need attached at one time. Computers do all kinds of wacky things when you deprive them of juust enough power. Even if...

That might give it a little bit of a break, but from what you're telling me you've got devices attached like nobody's business.

Side note: With all these hard drives here and hard drives there, that's yet another data point for my thread: How much space on your storage devices do you really use or need?

That's not a given, but admittedly it's less likely that they'll be GPT than MBR.

It most definitely is.

Did you ever click "Ignore future crashes of this program version" in any of the dialogs? Did the dialogs regard Skype? Also, if the dialog actually said "Ubuntu has encountered an internal error", then that probably refers to a desktop component like Caja, and not some third-party application like Skype. If the dialog said "The application Skype has closed unexpectedly", then that would indicate a Skype issue.


For starters, reproduce this bug by plugging in a drive while the system's running, then execute at the terminal:

grep -i caja ~/.xsession-errors

Paste the output of that command into a post here, select the pasted stuff, and click the </> at the top of the post editor. This can help us figure out what's wrong.

grep -i caja ~/.xsession-errors
(caja:1765): Gtk-WARNING **: 17:55:55.414: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client
(caja:2519): Gtk-WARNING **: 17:57:46.427: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client
(caja:2519): Gtk-CRITICAL **: 18:06:35.408: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:2519): Gtk-CRITICAL **: 18:06:35.408: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:2519): Gtk-CRITICAL **: 18:06:35.408: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:2519): Gtk-CRITICAL **: 18:06:35.409: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:2519): Gtk-CRITICAL **: 18:06:35.409: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:2519): Gtk-CRITICAL **: 18:06:35.409: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
  File "/usr/share/caja-python/extensions/dejadup.py", line 156, in get_file_items
  File "/usr/share/caja-python/extensions/dejadup.py", line 70, in get_dejadup_paths
  File "/usr/share/caja-python/extensions/dejadup.py", line 156, in get_file_items
  File "/usr/share/caja-python/extensions/dejadup.py", line 70, in get_dejadup_paths
  File "/usr/share/caja-python/extensions/dejadup.py", line 156, in get_file_items
  File "/usr/share/caja-python/extensions/dejadup.py", line 70, in get_dejadup_paths
  File "/usr/share/caja-python/extensions/dejadup.py", line 156, in get_file_items
  File "/usr/share/caja-python/extensions/dejadup.py", line 70, in get_dejadup_paths
(caja:4768): Gtk-WARNING **: 18:22:58.252: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client
(caja:11550): Gtk-WARNING **: 09:11:11.224: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client
(caja:11550): Gtk-CRITICAL **: 09:11:23.813: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:11550): Gtk-CRITICAL **: 09:11:23.814: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:11550): Gtk-CRITICAL **: 09:11:23.814: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:11550): Gtk-CRITICAL **: 09:11:23.814: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:11550): Gtk-CRITICAL **: 09:11:23.814: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:11550): Gtk-CRITICAL **: 09:11:23.814: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:13948): Gtk-WARNING **: 11:39:59.897: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client
(caja:22699): Gtk-WARNING **: 18:41:19.334: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client
(caja:22699): Gtk-CRITICAL **: 19:23:38.694: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:22699): Gtk-CRITICAL **: 19:23:38.695: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:22699): Gtk-CRITICAL **: 19:23:38.695: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:22699): Gtk-CRITICAL **: 19:23:38.695: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:22699): Gtk-CRITICAL **: 19:23:38.695: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:22699): Gtk-CRITICAL **: 19:23:38.695: gtk_container_foreach: assertion 'GTK_IS_CONTAINER (container)' failed
(caja:22699): Gdk-CRITICAL **: 19:33:03.179: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed
  File "/usr/share/caja-python/extensions/dejadup.py", line 156, in get_file_items
  File "/usr/share/caja-python/extensions/dejadup.py", line 70, in get_dejadup_paths
  File "/usr/share/caja-python/extensions/dejadup.py", line 156, in get_file_items
  File "/usr/share/caja-python/extensions/dejadup.py", line 70, in get_dejadup_paths
  File "/usr/share/caja-python/extensions/dejadup.py", line 156, in get_file_items
  File "/usr/share/caja-python/extensions/dejadup.py", line 70, in get_dejadup_paths
  File "/usr/share/caja-python/extensions/dejadup.py", line 156, in get_file_items
  File "/usr/share/caja-python/extensions/dejadup.py", line 70, in get_dejadup_paths
  File "/usr/share/caja-python/extensions/dejadup.py", line 156, in get_file_items
  File "/usr/share/caja-python/extensions/dejadup.py", line 70, in get_dejadup_paths
  File "/usr/share/caja-python/extensions/dejadup.py", line 156, in get_file_items
  File "/usr/share/caja-python/extensions/dejadup.py", line 70, in get_dejadup_paths
  File "/usr/share/caja-python/extensions/dejadup.py", line 156, in get_file_items
  File "/usr/share/caja-python/extensions/dejadup.py", line 70, in get_dejadup_paths

Otherwise, I'm much more worried about the drive ubuntu mate is installed on, looks like it's in pre-fail. Also, I installed gparted from the software boutique for some reason and that brought with it a lot of unrelated stuff that apt install gparted wouldn't have, even updated the kernel. The terminal window ended with an error I never saw before, but it said it was going to boot from the old leftover swap partition (which it is using even if it is on a different drive, I didn't expect this to happen, otherwise I would have deleted it as it is not needed with 20.04) because sdb1 (where ubuntu mate is) had issues. The syslogs regarding sdb don't look good, nor does Disks saying it now has 11k bad sectors. I just ordered a 2TB Seagate, too bad WD's are so expensive, or if at 2TB and lower than 100 bucks, are 5400 rpm and with 64mb of cache, the 2TB Seagate Barracuda that's on my way is 7200 rpm and has 256mb of cache. Looks like I'll have to start over, thankfully this is very early on! So far nothing is acting weird and using more ram or cpu than it should, but when I have to reboot for a reason or another, I really wonder what will be happening then. I couldn't even find the error in the Log Checker and all of the logs in there because I installed gparted with software boutique, I can see the sequence where gparted and all the other packages that were installed when I did so, but the initramfs related error and saying it will boot from sda5, a leftover swap partition from an entirely removed Linux Mint 17.3 on that same drive (sda)...not sure what will happen, I can always just force boot on the drive I want it to happen though.

Thanks for your answer tho. I don't mind some snark, I tend to be overly polite in forums such as those but you would tell me to wash my keyboard and hands with what some previous weird president said could maybe cure covid, bleach, if you saw me sometimes elsewhere :slight_smile:

I have a huge music archive and honestly until I can afford multiple 4TB drives into an external RAID array (my tower is big, but not big enough to fit that in), I will never feel secure into not losing what is 22 years of music collecting!

P.S Oh and btw, I did insert a few usb key drives and caja had no problems with those. It also successfully read an old usb 2.0 500gb drive I normally don't mount or even press the power button on so that can even happen, it's purely a recovery/data drive of old stuff one with broadband since 1999 will end up with not wanting to lose, mostly old video games that I do intend on putting at use with some Hyperspin system sometimes. Same with now what is sda1 where Mint used to be and the third (1 TB WD Red drive I paid for 99 dollars 6 years ago...those prices nowadays make no sense, not overly expensive, just, like why bother to get a 4TB drive for 130 + tax so about 165 for me when I can get a 1 Tb drive for 44 dollars / 2 TB drive for 59) internal hard drive is just data too. I don't download much anymore, but you never know, that FTTH connection has to be used. Thing is, it differentiates itself like the drive in the usb3/eSata-III (I'll install that e-sata pci-e port sometime and see if the speeds are different, but then again, that means taking power from that PSU you doubt 500 watts can sustain efficiently) hot-swap dock that contains a 2TB Blue WD...they are mechanical drives, that old one in the usb 2.0 enclosure also is, and it is set to work as as external, but isn't what I think are solid state drives (the 2 Seagate Expansions, 1TB and 2TB) with no power button, my usb 3.0 extension has on/off switches so when I don't use the drives and things are normal, I turn them off, which they can't do normally, so I save on the PSU more than one might think. But I do charge my phone, vape, and many other things people bring here that need quick charging (that mobo of mine might be a bit old, but it has that 4x faster charging feature than regular mobos of those days). It's an Asus M5A97 LE R2.0 if that helps. This is mostly supplemental to the tangeantial and not a priority, amount of things plugged to the hm...16 2.0 usb ports (I would use ps/2 mouse and keyboard if I found decent ones, also that work, the mobo has the ports still, but those I tried didn't work in win7 or LM 17.3 (win7 is entirely disappeared from this system btw, do not think it is still there), there's no good reason to have those on usb if they have cords, only my keyboard does, so the wifi mouse dongle is needed yeah, so that's 2 other usb devices, and my keyboard is a fancy flashy colorful one, not really it's only red but is mechanical and waterproof. Then there's the turntable, that is rarely turned on these days, but I go through phases where I get tired of digital files even if FLAC and listen to the stuff like I should.

I don't think I overuse them, there's still 4 2.0 usb ports left unused out of 16, some with devices that are never turned on generally. That's the complimentary info you might have wanted in all details possible I think...and now only 2 usb 3.0 ports taken out of 6 (with the added hub with 4 slots and on/off switches) that only has the hot swap dock drive plugged in it for wiring configuration convenience, there's one of the 2 on the mobo that is unused as of now, because I can't get caja to read those drives like everything else is doing without issue!).

Yikes. I don't want to sound offensive, but that's very dense writing you have there -- and I have an unusually high tolerance for long paragraphs. Sorry, but I literally can't comprehend what you just wrote.

Here's a tip for making your posts more readable: Remove unnecessary context. I know troubleshooters always ask for "as much information as possible", but they don't need your entire life's story when they're trying to find out what causes Caja to crash. Here's an example -- I stripped down one of your paragraphs above:

Even that's still a little rambling, but it sure is a heck of a lot easier for me to read! Basically, if you started out talking about Caja and you find yourself writing about sales tax and USB turntables, then you've gone into too much detail.

Now, I didn't mean to lecture you like that, but it is a serious impediment to our resolving this issue.


Back to the meat of the issue:

Actually, Caja almost certainly does crash, based on the other symptoms you're telling me about -- it's just the desktop relaunches Caja so fast that it never appears to leave the task list.

Out of curiosity, try installing Thunar:

sudo apt install thunar

...and opening the offending hard drive(s) in Thunar and see if that works. Then open the same offending drives in Caja while Thunar is still open and see if Caja stays open this time.

Thank you.

1 Like

Hey thanks, sorry, I might have not been 100% sober, lots of celebrating around here since almost all covid measures are gone, been seeing people I hadn't in 2 years and I had just gotten home when I typed all of that. I talked about the USB turntable and everything else connected to it because you seemed curious about the unholy amount of usb 3.0/2.0 slots this desktop towers has and how many things end up plugged to it for different amounts of times.But yes, I'll do it cleaner next time if needs be, I'll get my nights sleep first :slight_smile:

I'll look into Thunar, it's a different file manager? I looked into installing nautilus but I thought that could create a mess when caja is also present and both being very similar yet also very different, one being for gnome and one for MATE gui.

What about the current drive UM 20.04 LTS is on having so many issues? I think it could be it, went from 83 bad blocks before installation to over 11k. Describing what happened when I installed gParted from the software boutique (for some reason, I always do that in the terminal), which resulted in a lot of other packages being installed and the final message after the newest kernel it brought with it was installed telling me it would try to boot from sda5 (old swap partition on different drive)...I don't know what's that all about, I couldn't find that text in all the logs in /var/logs, but I do see sdb/sdb1 (where UM 20.04 LTS is) having tons of issues. That's why I talked about how I ordered a new hard drive to replace it and I'll have to start things over again. If the drive where the whole thing, including caja is installed, that could explain simple task malfunctions, even if FileZilla and direct local links working for video files in VLC etc.

I'll come back after looking into Thunar and will tell you about this in a more bite-sized sober manner like this post :joy:

1 Like

Oh BTW, did those messages from the logs from when I plugged in one of those drives (I think twice in that time period) say anything? It looks like it is reacting badly to the listing of those folders.

In all cases, Thunar wins. First time I see caja be this difficult...not the first time I see it acting strange tho, Mostly back in Mint 13 though. Interesting. Now I'm only worried of the drive that Ubuntu Mate is installed on and I said why in enough details here. That should go to another thread, because I'm gonna have to start over anyways, the hard drive I've ordered is getting here tomorrow, don't trust this one. Seagate are aggravating me, I mostly only had WD drives until that internal seagate drive and later those external usb drives, the fact they have no power switch on their own is already sketch...and it's Seagate brand, not the crappier brand they own that they sell externals as like HCTN or such. Hopefully that 2TB barracuda at 7200 RPM and 256MB of cache will do better, the only 2TB mechanical WD I could get for a similar price was 5400 rpm and 64mb cache, a WD Blue, obviously not a black.

That makes me think, that old undying 200gb first generation sata I have in that tower (that I should remove sometime and put the docked 2TB WD blue in there instead), that was before the supposed tsunami/cyclone etc. that destroyed a huge factory producing 90% of hard drives (apparently) back in 2010 when prices bounced up, and also back then, WD didn't have color codes, all their drives were built equal then. Not so anymore. With Seagate...I can only tell that NAS drives is the future, but even if I wanted some, my mobo from 2015 is too old for that, thankfully I got a CPU that will last me another decade and stay relevant, same with the graphics cards (2 in CrossFire), I get the most boring kind of issues, file manager and hard drive issues lol.

Thumbs up to you Gordon, you're great and thanks for bearing with me. I had thought of installing some third party file manager but I wondered how safe that would be, looks like Thunar isn't creating a mess...au contraire my friend. You have a good one, if you can see something in that log though that could be of general help, I could take it, but otherwise, problem solved!

Funny thing I observed since Thunar solved this.

When in Thunar, if I right click one of the offending seagate expansion external drives (I did it with the 1TB for now), and go to properties...Thunar will start counting the files, and there's something in the 200GB to 325GB part of the 850gb used on the drive where it was adding every MB very slowly. But when it was over....I could open the drive in Caja fine.

Seems like Caja crashes because it gives up trying to list the drives, if they were not present at post/boot anyway. I wonder what can explain this insanity, but if doing this with Thunar on the other seagate expansion external drive and caja reads em fine after doing the same thing. I'll have fixed it, seems like Caja has some kind of timeout where it will give up showing the folders list (that I have in List mode, no huge icons) if they don't show up after a certain amount of time.

Strange enough that I thought I should add this as an addendum.

Thanks again.

1 Like