[Bug] MMS doesn't send pictures when Patchmanager is installed

By chance, testing to get MMS back was successful on the 3rd installed app.
I wouldn’t have liked to have to reinstall/reboot all of them to find the problem :upside_down_face: :grinning:

Nice find, @ric9k - I can also reproduce this.

I’ve tried stracing jolla-messages, sailfish-share and commhistoryd and I’ve yet to find an explanation (the second one is a new process at each share popover).

sailfish-share seems to be passing a descriptor to jolla-messages and the messages app makes a 0x20000-byte buffered copy into /tmp/sailfish-share_XYZ then something goes wrong, by the time it passes it to commhistoryd the file is already unlinked (looks like jolla-messages does this, not sure about the timing).

Looks like you do get a preview of the file in the message, but when you hit send the file is already gone (hence the error you found).

There may be some open() bugs in the preloading library of patchmanager, I have yet to see its role here, will need to dig further.


Since the separate sailifsh-share process was introduced in SFOS 4.3.0, I’d also be curios if anyone has a previous version to check if the bug was there too.

1 Like

I’m on freshly flashed licenced 4.3.0.12 on Xperia XA2 Ultra, with Patchmanager installed, and I do NOT have problems with sending MMS. On the contrary, I have problems with receiving MMS, if the message only contains a multimedia file (image, audio, etc.) but no text - as reported here.

Hmm maybe it’s a 64-bit thing :thinking:

I’ve seen this PR from @pvuorela recently in libcommhistory :

It looks like a race condition, but I cannot figure out why Patchmanager is consistently putting in on the wrong path…

2 Likes

In this case patchmanager should introduce a infinitesimal delay of checking that the path starts with tmp and bailing querying the patchmanager service for a patched file.

Thanks for your find @dcaliste! I’ve built that branch and the results seem better (i.e image loads, MMS says sending…).
If you are blocked by this and want to use patchmanager, upgrade to this libcommhistory-qt5-1.11.12+jb56314.fix_mms_race package (aarch64 only) package: Show nemo:devel:hw:xiaomi:tucana / libcommhistory - SailfishOS Open Build Service

If anything goes wrong, for 4.3.0.12 you need to downgrade libcommhistory to 1.11.11-1.11.1.jolla

2 Likes

Great you guys found something!
I could test it too on armv7 but have no sdk neither would know how.
But no hurry.

I did try building armv7hl on OBS, but did not test it. Use with caution: State of Repository sailfish_latest_armv7hl for home:b100dian:commhistoryd / libcommhistory - SailfishOS Open Build Service

2 Likes

Thanks,
For a normal usage, du I only need to rmp install libcommhistory-qt5-1.11.12?

I think -declarative and -tools too. Since I actually installed them from the repo it was easier for me. Maybe you should use zypper ar to add that repository, zypper ref and the zypper up libcommhistory-qt5

@vlagged Brilliant!
Thank you for that and for de-noobing me.

For other new users, if useful, I did:

$ devel-su
$ pkcon install zypper
$ zypper ar https://repo.sailfishos.org/obs/home:/b100dian:/commhistoryd/sailfish_latest_armv7hl/home:b100dian:commhistoryd.repo
$ zypper ref
$ zypper up libcommhistory-qt5

Installed Patchmanager, rebooted.
SMS in and out work, MMS in and out work (wifi).

It complained about repomd.xml and packages being unsigned.
That’s expected, isn’t it?

1 Like

Yes, public OBS does not sign…
Thanks for confirming that it works - and welcome to the world of watching github PRs to see when the fix will be merged then watching the text changelog to see when the fix will be delivered in a sailfish update:) If you get this package listed as conflicting at the next update, you need to downgrade it first to the version above with something like zypper install --oldpackage package-name-x.x.x

1 Like

Ok. Now, the bug is in my head: How will I remember to downgrade before upgrading? :–)
Thanks again.
Cheers

1 Like

Only if it shows up on the OS update screen as a problem package need you worry about it.

BTW the PR is merged now and tagged as 1.11.13 in master. This means the fix will be generally available in some next release

Sorry, I don’t know what is PR?

I may even add that it has been backported in a upgrade-4.4.0 branch with the tag 1.11.11.1. So it may resonnably be part of the coming 4.4 release.

@ric9k, a PR is a pull request in Github. A public mechanism where some code in development is reviewed before being included in the main code. About the release, if you have installed the 1.11.12 package, you will see a message during UI upgrade saying to revert the libcommhistory-qt5. You can do it, as explained by @vlagged. In my experience, you can also leave it like that, the upgrade automatically downgrading it to the official 1.11.11.1 (the downgrade will not raise any issue, as far as I know, since the changes between the two version don’t require data migration, conflicting files…).

1 Like

Got it. Thank you very much.

Optionally remove the added repo:

zypper rr https://repo.sailfishos.org/obs/home:/b100dian:/commhistoryd/sailfish_latest_armv7hl/

(Couldn’t edit the sum up post)

wait are you guys saying mms works with wifi? How is this possible ?

Hmm didn’t see your post.
You are right, I don’t know actually. I just had wifi ON.
Gonna correct this in first post. EDIT: well…can’t edit anymore, sorry…

BTW, the fix is needed and works with 4.3.0.15 too.