Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem witch iOS App - Media #714

Closed
Der-Norden opened this issue Nov 20, 2018 · 24 comments
Closed

Problem witch iOS App - Media #714

Der-Norden opened this issue Nov 20, 2018 · 24 comments

Comments

@Der-Norden
Copy link

Hello,

I've noticed that when using the iOS app in the media area, no media is displayed.

Usually the app uploads uploaded pictures and videos by date. In addition, all images and videos are displayed in the selected folder.

Strangely, nothing is displayed. I use the current Nextcloud version 14.0.3. For testing, I have the current VM from the day before yesterday 18.11.2018 installed and tested. Same problem.

After that I installed Nextcloud on a web server. There are no problems with that. So it has to do with the VM. Wonder, no one has noticed it yet.

Sorry for the bad english. I used Google Translate ;-).

@Der-Norden Der-Norden changed the title Problem witch iOS Media Problem witch iOS App - Media Nov 20, 2018
@enoch85
Copy link
Member

enoch85 commented Nov 21, 2018

cc @marinofaggiana

@enoch85
Copy link
Member

enoch85 commented Nov 24, 2018

@rakekniven Have you seen this, o do you know what could cause it?

@rakekniven
Copy link
Member

Which version of the app? Should be working with upcoming v2.22.6

@Der-Norden
Copy link
Author

Der-Norden commented Nov 24, 2018

Which version of the app? Should be working with upcoming v2.22.6

Hi, I use the latest iOS version 2.22.5.10. It works with other Nextcloud installations. It does not work with this VM. Therefore, it is obvious that the error is related to the VM, right?

@enoch85
Copy link
Member

enoch85 commented Nov 24, 2018

It's really hard to know without knowing the exact specification of the two servers and the dependencies they use.

@rakekniven I don't use iOS nor do I have a iOS device. Do you think you can confirm that it's an issue in the VM or not?

@rakekniven
Copy link
Member

@Der-Norden Could you try another user (best would be a new one) on this server and check if it works?

@enoch85 No, I cannot confirm. New iOS release should be out soon.

@Der-Norden
Copy link
Author

@rakekniven It does not work with a new user either. The problem is only with this VM.

@enoch85
Copy link
Member

enoch85 commented Nov 25, 2018

@Der-Norden OK, so what is the exact specifications of the other installation? I need everything to be able to debug it.

@Der-Norden
Copy link
Author

@enoch85 From the other installation? Which installation is meant exactly? The offered VM I have installed with VMware Fusion. I did a minimalist installation.

For comparison, I have tried a demo instance of a provider. Additionally, I used the web installer from the Nextcloud site and installed it on a web directory. In these variants, the app works as intended and desired.

@enoch85
Copy link
Member

enoch85 commented Nov 25, 2018

From the other installation?

Yes.

I did a minimalist installation.

Try to do a full install of Ubuntu 18.04 and see if that changes anything.

Do you experience the same issues when installing with the VM scripts on Digitalocean?

@marinofaggiana
Copy link
Member

Hi, the media view make a webdav SEARCH with contenttype image AND video; verify if exists error in server log.

@Der-Norden
Copy link
Author

@marinofaggiana Hi, the following error message can be seen.

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'SELECT "fileid", "storage", "path", "parent", "name", "mimetype", "mimepart", "size", "mtime", "storage_mtime", "encrypted", "etag", "permissions", "checksum" FROM "oc_filecache" "file" WHERE ("storage" = ?) AND ((("mimepart" = ?) OR ("mimepart" = ?)) AND ("mtime" >= ?))' with params [4, 10, 18, -62135593592]: SQLSTATE[22003]: Numeric value out of range: 7 ERROR: value "-62135593592" is out of range for type integer

@Der-Norden
Copy link
Author

@marinofaggiana The following error can also be seen.

Sabre\DAV\Exception\ServiceUnavailable:

@enoch85
Copy link
Member

enoch85 commented Nov 26, 2018

@Der-Norden Are you using MariaDB or MySQL on the Nextcloud instances that work, or is it PostgreSQL?

@LardRulo
Copy link

If I translate the parameter "-62135593592" of mtime to human readable format, I get the date around "01. January 0001". I don't know if it's a limit of the iOS, the Linux, the Webserver or other things. But I think data type mtime should not be greater than int32; it looks like a type overflow.
Is there a communication between the nextcloud and the Client App about limits ? Why runs the same Client App on a fresh nextcloud (not the Hansson VM) but not on both specific Hansson instances ?

@enoch85
Copy link
Member

enoch85 commented Nov 27, 2018

@Der-Norden Are you using MariaDB or MySQL on the Nextcloud instances that work, or is it PostgreSQL?

@Der-Norden
Copy link
Author

@enoch85 The working instance runs on SQlite. Another demo instance runs with MySQL.

@enoch85
Copy link
Member

enoch85 commented Nov 27, 2018

None of the VM images run either of those. The VM runs PostgreSQL so try with that and see if it makes any difference.

@Der-Norden
Copy link
Author

Meanwhile, I tried the same with an Android system. It works with Android. If the problem with iOS is related, the question must be asked why it works with other instances. Is there a kind of overflow with the VM?

@enoch85
Copy link
Member

enoch85 commented Nov 27, 2018

@Der-Norden

Is there a kind of overflow with the VM?

What do you mean?

You still haven't provided the exact specifications we were asking for. Please do that.

@Der-Norden
Copy link
Author

@enoch85

What do you mean?

What does this question refer to?

You still haven't provided the exact specifications we were asking for. Please do that.

Which specifications?

The specifications of the VM are known. Finally, it's about this VM.

@enoch85
Copy link
Member

enoch85 commented Nov 29, 2018

@Der-Norden

I asked you what you meant by "overflow with the VM"

screenshot from 2018-11-29 08-50-09

What I'm asking for is the specifications on the other VM/VPS you are using so that we have something to refer to. You mentioned SQLite and MySQL:

The working instance runs on SQlite. Another demo instance runs with MySQL.

So what are the exact specifications of the servers where this is working?

@LardRulo
Copy link

I had access to an installation of a Hansson VM to retrace the failure and follow my idea with the possible typ mismatch of mtime. I got exact the same failure with these instance. What I know - it's an upgraded Nextcloud from Version 13 to 14. All updates installed on Linux and Nextcloud without security and configuration warnings.

Here is the specification of these server suite:

  • Nextcloud 14.0.4.2
  • Ubuntu 18.04.1 (x86_64)
  • PHP 7.2.10
  • Database PostgrSQL 10.6

To test the server I'm using Nextcloud App for iOS 2.22.5.10.

Also I find out more then one issue about this problem #552 and nextcloud/server#7637

As a result I searched around; play with PostgreSQL, visit logs and Nextcloud sources to find a reference to this problem. After one hour and understanding the main cause I solved the problem on these specific Nextcloud server.

Using BigInt (64bit) is described in the Nextcloud 13 documentation on this side
https://docs.nextcloud.com/server/13/admin_manual/configuration_database/bigint_identifiers.html

Finally it's a simple command to convert the filecache of the PostgreSQL database to "BigInt"

sudo -u www-data php occ db:convert-filecache-bigint

There are two question left at this topic

  1. Is it possible to run the filecache conversion command before delivering the next release of the Hansson VM ? I guess these was not done in the actual release as "Der-Norden" wrote.
  2. Why occur these failure only while using the iOS Nextcloud App and not with an Android Version ?
    Do they use other mechanism or do they convert the mtime to int32 before sending the request ?

Ok, for me it's solved. Good luck for all others.

@enoch85
Copy link
Member

enoch85 commented Nov 30, 2018

@LardRulo Thank you very much for your thorough investigation!

Actually the fix you mentioned have been in the update script since a few months back: https://github.com/nextcloud/vm/blob/master/nextcloud_update.sh#L341-L343

  1. It's already included as you can see --^ @Der-Norden Did you run the update script included in the VM?

  2. cc @rakekniven @marinofaggiana

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants