You are not logged in.

#1 2021-01-28 11:34:32

LuizF
Member
Registered: 2020-12-27
Posts: 30

Error attaching PDF on Gmail

Hello, i'm' not sure if i'm posting this on the right  session.

When i try to attach some files (normally, PDFs), Gmail returns "The file is 0 bytes, so it will not be attached".

I've already tried on firefox, chroimum and google chrome, it didn't work in any of them.

And it only happens on my archlinux, i've got no ideia what to do.

Could someone help me?

Thanks

Offline

#2 2021-01-28 20:37:44

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,700

Re: Error attaching PDF on Gmail

Moving to Applications and Desktop Environments.

Are the pdf files known to be good?   What kind of file system are they on?  Are they symlinks?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2021-01-28 23:40:05

LuizF
Member
Registered: 2020-12-27
Posts: 30

Re: Error attaching PDF on Gmail

ewaller wrote:

Moving to Applications and Desktop Environments.

Are the pdf files known to be good?   What kind of file system are they on?  Are they symlinks?

Well, yes. I tried books, scientific papers, and even anything almost empty that i just created.

Some of them work fine, but the most part doesn't attatch.

I'm sorry, what would be the file system? Like Dolphin? If yes, than it's Dolphin.

They're not symlinks.

Offline

#4 2021-01-29 08:14:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,580

Re: Error attaching PDF on Gmail

what would be the file system? Like Dolphin?

https://wiki.archlinux.org/index.php/Filesystem

stat /path/to/file.pdf
file /path/to/file.pdf
mount

Online

#5 2021-01-29 19:42:06

xerxes_
Member
Registered: 2018-04-29
Posts: 1,070

Re: Error attaching PDF on Gmail

@LuizF
Do you use any sandboxing software, like firejail? I had something like that problem long time ago when I was trying to upload files to some forum (not this one) and they become empty after uploading, but I don't remember details. I didn't remember how I resolved it (maybe better learning of firejail?).

Last edited by xerxes_ (2021-01-29 19:44:42)

Offline

#6 2021-02-11 17:58:55

LuizF
Member
Registered: 2020-12-27
Posts: 30

Re: Error attaching PDF on Gmail

xerxes_ wrote:

@LuizF
Do you use any sandboxing software, like firejail? I had something like that problem long time ago when I was trying to upload files to some forum (not this one) and they become empty after uploading, but I don't remember details. I didn't remember how I resolved it (maybe better learning of firejail?).

No, i don't use anything like that.

I recently realised that it only happens with files smaller than 200kb, or smtgh like that.

I mean, not excatly 200kb, but i can't attatch small files at all, the system returns it weights 0bytes, even tough it doesn't, it's just few Kb.

Offline

#7 2021-02-12 15:01:35

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: Error attaching PDF on Gmail

ewaller wrote:

What kind of file system are they on?

^ This is still the most important question you have not answered. What filesystem did you create/mount where the files you are attaching are on?

Offline

#8 2021-02-12 18:27:27

LuizF
Member
Registered: 2020-12-27
Posts: 30

Re: Error attaching PDF on Gmail

twelveeighty wrote:
ewaller wrote:

What kind of file system are they on?

^ This is still the most important question you have not answered. What filesystem did you create/mount where the files you are attaching are on?

I'm sorry, the filesystem is ext4.

The files are on Desktop

Offline

#9 2021-02-12 20:47:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,580

Re: Error attaching PDF on Gmail

The files are on Desktop

They're not symlinks, though. Are they?

file  ~/Desktop/some.pdf
stat ~/Desktop/some.pdf

Online

#10 2021-02-12 21:24:20

LuizF
Member
Registered: 2020-12-27
Posts: 30

Re: Error attaching PDF on Gmail

seth wrote:

The files are on Desktop

They're not symlinks, though. Are they?

file  ~/Desktop/some.pdf
stat ~/Desktop/some.pdf

No, they're not. Sometimes, i just take a picture of a document with my mobile, export the photos into a PDF and send to my e-mail.

Than, i download it on my Arch and, if i try to attatch it, the system returns that error (not allways, but many times).

It's not only gmail, actually, i realised it happens whenever i want to upload the bugged file, it doesn't matter the plataform (Discord, Skype, among others).

It's the minority of PDFs, though. The most part works fine.

Howeever, i can't see any pattern...

For example, yesterday i needed to merge 2 PDFs that were uploading fine.

The moment i merged them using a website and downloaded again, they bugged. I couldn't send the merged PDF by e-mail or any upload system.

Offline

#11 2021-02-12 21:42:55

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,580

Re: Error attaching PDF on Gmail

Output of "mount"?
What if after you download the, you run an explicit "sudo sync" before trying to upload them?

Online

#12 2021-02-12 22:59:46

LuizF
Member
Registered: 2020-12-27
Posts: 30

Re: Error attaching PDF on Gmail

seth wrote:

Output of "mount"?

Output:

roc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=3922724k,nr_inodes=980681,mode=755,inode64)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p6 on / type ext4 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=755,inode64)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=415)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,size=3930128k,nr_inodes=409600,inode64)
/dev/nvme0n1p7 on /home type ext4 (rw,relatime)
/dev/nvme0n1p5 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /run/user/1001 type tmpfs (rw,nosuid,nodev,relatime,size=786024k,nr_inodes=196506,mode=700,uid=1001,gid=985,inode64)
gvfsd-fuse on /run/user/1001/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1001,group_id=985)
seth wrote:

What if after you download the, you run an explicit "sudo sync" before trying to upload them?

It actually worked! I'm a new user, could you explain me why it worked? i don't know what it does and why it solved the problem.

I typed sudo sync on terminal and i was able to upload the file after it.

Is there a way to make it permanent?

Thanks

Offline

#13 2021-02-13 09:04:27

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,580

Re: Error attaching PDF on Gmail

Some caching?

dumpe2fs -h /dev/nvme0n1p7

Do you use a userspace tool to delay writes or do you keep the browser cache/profile in some tmpfs?
More specifically, what is "Than, i download it on my Arch" in particular? (browser, mail client, wget…) and do you have similar issues uploading (eg. to yor google drive) files you didn't download this way (eg. /etc/profile - and I assume the answer is "no")?

Online

#14 2021-02-13 14:06:28

LuizF
Member
Registered: 2020-12-27
Posts: 30

Re: Error attaching PDF on Gmail

seth wrote:

Some caching?

dumpe2fs -h /dev/nvme0n1p7
dumpe2fs 1.46.1 (9-Feb-2021)
Filesystem volume name:   <none>
Last mounted on:          /home
Filesystem UUID:          d3af4a77-4441-4cc6-9769-84e7676781d2
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file dir_nlink extra_isize metadata_csum
Filesystem flags:         signed_directory_hash 
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              5398528
Block count:              21583104
Reserved block count:     1079155
Free blocks:              17226272
Free inodes:              5098279
First block:              0
Block size:               4096
Fragment size:            4096
Group descriptor size:    64
Reserved GDT blocks:      1024
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Flex block group size:    16
Filesystem created:       Sat Nov 21 21:47:42 2020
Last mount time:          Wed Feb 10 15:34:23 2021
Last write time:          Wed Feb 10 15:34:23 2021
Mount count:              59
Maximum mount count:      -1
Last checked:             Sat Nov 21 21:47:42 2020
Check interval:           0 (<none>)
Lifetime writes:          207 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
First orphan inode:       660148
Default directory hash:   half_md4
Directory Hash Seed:      887528bf-cf26-48c3-a624-9f0674d77406
Journal backup:           inode blocks
Checksum type:            crc32c
Checksum:                 0x025f232b
Journal features:         journal_incompat_revoke journal_64bit journal_checksum_v3
Total journal size:       512M
Total journal blocks:     131072
Max transaction length:   131072
Fast commit length:       0
Journal sequence:         0x0008a379
Journal start:            99733
Journal checksum type:    crc32c
Journal checksum:         0xcbee069f
seth wrote:

Do you use a userspace tool to delay writes or do you keep the browser cache/profile in some tmpfs?
More specifically, what is "Than, i download it on my Arch" in particular? (browser, mail client, wget…) and do you have similar issues uploading (eg. to yor google drive) files you didn't download this way (eg. /etc/profile - and I assume the answer is "no")?

I don't use any of that. Well, not that i know of. When i said that i downloaded the files, i was refering to browser, it doesn't metter if chrome or firefox, it happens on both.

Could you give an example of a userspace tool that would cause this problem?

I'ver never tried to create a PDF on my local machine, i allways download it from google docs or smthg like that, so i guess i don't have issues uploading files i didn't download.

I'm sorry, english is not my first language, as you can probably tell, but i hope u can understand me well enough.

Thanks

Offline

#15 2021-02-13 14:40:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,580

Re: Error attaching PDF on Gmail

https://archlinux.org/packages/communit … nc-daemon/

Try to run

cd ~/Desktop # this assumes this is your desktop path
wget https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf

and try to upload the resulting dummy.pdf

Online

#16 2021-02-13 19:34:24

LuizF
Member
Registered: 2020-12-27
Posts: 30

Re: Error attaching PDF on Gmail

seth wrote:

https://archlinux.org/packages/communit … nc-daemon/

Try to run

cd ~/Desktop # this assumes this is your desktop path
wget https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf

and try to upload the resulting dummy.pdf

Yes, it uploaded normally.

So, what exactly does that means?

Offline

#17 2021-02-13 21:50:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,580

Re: Error attaching PDF on Gmail

That the issue seems limted to something particular to not wget downloading stuff ;-)
What about curl?

https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf > ~/Desktop/dummy2.pdf

Also, what if you rename the file after downloading it w/ the browser?

Online

#18 2021-02-14 18:12:56

LuizF
Member
Registered: 2020-12-27
Posts: 30

Re: Error attaching PDF on Gmail

seth wrote:

That the issue seems limted to something particular to not wget downloading stuff ;-)
What about curl?

https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf > ~/Desktop/dummy2.pdf

Also, what if you rename the file after downloading it w/ the browser?

Curl Worked too.

If i rename, it still doesn't upload.

Offline

#19 2021-02-14 19:24:51

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: Error attaching PDF on Gmail

Browsers often download with a temporary filename and then rename it after the download is complete. Does that work with wget as well?

wget https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
mv dummy.pdf dummy-new.pdf

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

Board footer

Powered by FluxBB