Skip to content

Can't disable opening pdf files on the mobile Nextcloud app #13563

Open

Description

@alexonlyoffice

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

File is being opened by default when clicked on its name even if it is indicated to not open the file format by default in the ONLYOFFICE connector settings in Nextcloud, for example PDF. We checked from our end that our connector is passing the correct data as per documentation here.

In mimetypes we are passing the default data (the checked checkbox in the connector settings), for example:

"mimetypes":[
                  "application\/vnd.openxmlformats-officedocument.wordprocessingml.document",
                  "application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                  "application\/vnd.openxmlformats-officedocument.presentationml.presentation"
               ],

In optionalMimetypes we are passing other supported mimetypes like:

               "optionalMimetypes":[
                  "application\/pdf",
                 ... 

Shown on PDF format example, it is being moved from one list to another when the checkbox is checked/unchecked in the connector settings. It seems that Nextcloud app is not handling these lists properly.

Issue ONLYOFFICE/onlyoffice-nextcloud#1015 described in our repo.

Expected behaviour

File is not opened

Actual behaviour

File is opened even if the checkbox for the chosen file format is unchecked in the ONLYOFFICE connector settings

Android version

Android 14

Device brand and model

Google Pixel 8

Stock or custom OS?

Stock

Nextcloud android app version

Nextcloud Android App 3.29.1

Nextcloud server version

Nextcloud 29.0.4

Using a reverse proxy?

I don't know

Android logs

No response

Server error logs

No response

Additional information

No response

Activity

  1. AndyScherzinger commented on Sep 13, 2024

    @AndyScherzinger
    Member
  2. retiarylime commented on Dec 13, 2024

    @retiarylime

    Also facing the same issue. Any update after 3 months?

  3. ottsimon commented on Dec 14, 2024

    @ottsimon

    I'm still on Nextcloud 29, so I was able to downgrade the ONLYOFFICE app to 9.2.2.
    This version doesn't support editing PDFs and therefore, if I understand correctly, is not affected by this bug.

    But a fix would be very nice, so I can update the app again and use Nextcloud 30 in the future.

  4. modelrailroader commented on Sep 11, 2025

    @modelrailroader

    This problem still exists and leads to the problem that users can't open pdf-files on mobile devices when an open office server is installed at the same time. This is crucial, please fix it urgently.

  5. Dieter-W commented on Nov 6, 2025

    @Dieter-W

    Hi,
    I run also into this problem. Is there an outlook when a fix is available

  6. Dieter-W commented on Nov 11, 2025

    @Dieter-W

    @tobiasKaminsky , @alperozturk96 could you answer my question.
    On an IPhone this works, there the PDF viewer opens the file.

  7. alperozturk96 commented on Nov 12, 2025

    @alperozturk96
    Collaborator

    @Dieter-W Hello. I need to check the issue. I didn't come across this before. I will try to reproduce it.

  8. Unostot commented on Nov 17, 2025

    @Unostot

    Hello,
    A downgrade of the OnlyOffice App as suggested in ONLYOFFICE/onlyoffice-nextcloud#1015 to 9.2.2 helps somehow.
    I can now open PDFs in Libera and ODS Files open with OnlyOffice on my android phone, if I force nextcloud to use the incompatible version.

    But since the OO App v9.2.2 is not compatible with Nextcloud 30+, I can not configure it anymore. Trying to reach the config page for OO in Nextcloud administration leads to an internal server error.
    But if configured correctly before the downgrade, it seems to work somehow.

    So seems like we have currently 3 options:

    1. deactivate OnlyOffice App in Nextcloud
    2. downgrade OnlyOffice App to 9.2.2 and hope it works without major issues -> office stuff via OO, PDFs can be opened without OO.
    3. live with the fact that PDFs on android get opened via OnlyOffice regardless of settings.

    Since this Issue is there for quite some time now, I'm hoping @alperozturk96 can find the problem, and finally solve it...

    versions I use as of writing:
    Nextcloud: 31.0.10
    NC Android app: 3.34.1
    OO NC App: 9.11

    Greetings,
    Uno

    P.S.
    Another maybe interesting point:
    I had an older OnlyOffice Instance running until yesterday.
    Before updating the OnlyOffice Instance I got the The “documentType” parameter for the config object is invalid. Please correct it. when trying to open PDFs.
    As long as the Nextcloud OO App was active, I could not open PDFs on android.
    (however my work cloud server without onlyoffice could open them like desired, thats why I investigated further why I had this different behaviour)

  9. Unostot commented on Nov 17, 2025

    @Unostot

    Another perhaps helpful/important point @alperozturk96
    If the PDF is not downloaded in the android app (no green hook), then it gets opened via OnlyOffice
    If it its present, so downloaded first, or after opening the first time, then it gets not opened via OnlyOffice but instead by the android PDF viewer

    (before the mentioned updates this was actually my workaround: on direct click the documentType error. downloading PDF first and then clicking it -> normal opening)

  10. jscti commented on May 2, 2026

    @jscti

    Another perhaps helpful/important point @alperozturk96 If the PDF is not downloaded in the android app (no green hook), then it gets opened via OnlyOffice If it its present, so downloaded first, or after opening the first time, then it gets not opened via OnlyOffice but instead by the android PDF viewer

    (before the mentioned updates this was actually my workaround: on direct click the documentType error. downloading PDF first and then clicking it -> normal opening)

    Thanks for that. Worked, but file will need to be downloaded after each new file update.
    Issue critical, but lost in 1200+ issues .. A simple toggle "Open all files with system app" is needed

  11. major-mayer commented on Jun 20, 2026

    @major-mayer

    @alperozturk96 Any chance that you could have a look on this issue (again)?
    The issue annoys me for a very long time, because you are forced to wait for the whole OnlyOffice editor to load, when opening a PDF with an installed app would be much faster.
    I would really appreciate if this problem could be fixed.

  12. linked a pull request that will close this issuefix(editor): file opening flow #17226on Jun 22, 2026
  13. tobiasKaminsky commented on Jun 25, 2026

    @tobiasKaminsky
    Member

    idea:

    • add "open with onlyoffice" file menu entry, only if file is downloaded
    • for "optional mimetypes" -> add file menu entry
  14. major-mayer commented on Jul 4, 2026

    @major-mayer
    * for "optional mimetypes" -> add file menu entry
    

    If that means that file types that OnlyOffice could open in theory (like PDF) but are currently disabled in the Nextcloud app settings, are downloaded and opened with the regular file handler, I would be happy 👍

  15. alperozturk96 commented on Jul 8, 2026

    @alperozturk96
    Collaborator

    Once the QA APK generated could you please try and share your feedback?

    #17226

  16. major-mayer commented on Jul 21, 2026

    @major-mayer

    Sorry for the late reply, I was on vacation.
    I have just downloaded the APK and tried opening a PDF, and it opened in the Android PDF viewer 🥳
    On the other side, if I open a DOCX/ ODT it opens in the OnlyOffice web viewer, as expected.

    These are my OnlyOffice settings in Nextcloud:

    Image

    So I think the behavior now matches the settings.
    Thanks for your work!

    Edit: I just learned about the new file action in the context menu.

    Everything works as expected, except when the file is not yet downloaded and online + local editor support is there.
    Why can't I directly open the file in the online editor, but have to download it (and subsequently open it in a local editor) first?
    I don't care too much, but I could imagine this to be somewhat counterintuitive for other users.

  17. tobiasKaminsky commented on Jul 22, 2026

    @tobiasKaminsky
    Member

    Why can't I directly open the file in the online editor, but have to download it (and subsequently open it in a local editor) first?

    What mimetype was this? Is this maybe within "optional mimetype"?

  18. major-mayer commented on Jul 22, 2026

    @major-mayer

    Why can't I directly open the file in the online editor, but have to download it (and subsequently open it in a local editor) first?

    What mimetype was this? Is this maybe within "optional mimetype"?

    I can reproduce it with different file types like ppt, pptx, odt, ect.
    None of these should be in the optional mimetypes list, if I understand it correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions