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

Import CSV file from another Nextcloud Tables instance not working #1518

Open
Spheerys opened this issue Dec 30, 2024 · 1 comment · May be fixed by #1545
Open

Import CSV file from another Nextcloud Tables instance not working #1518

Spheerys opened this issue Dec 30, 2024 · 1 comment · May be fixed by #1545
Assignees
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working import/export

Comments

@Spheerys
Copy link

Steps to reproduce

  1. On server 1 with Nextcloud+Tables, we go to the Data of one table, and select Export to CSV file
  2. On server 2 with same version of Nextcloud+Tables, create a new Table, Import a table from file, and inject the CSV file get from Server 1
  3. The process start with the mention "This could take a long time", but after a while, no data are imported

Expected behavior

The data should be imported

Actual behavior

The data are not imported

Tables app version

0.8.2

Browser

Brave Version 1.73.104 Chromium: 131.0.6778.204 (Build officiel) (64 bits)

Client operating system

Linux

Operating system

debian

Web server

Apache

PHP engine version

PHP 8.2

Database

MySQL

Additional info

See the CSV file as attachment
contacts.csv

@Spheerys Spheerys added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Dec 30, 2024
@blizzz
Copy link
Member

blizzz commented Jan 6, 2025

Hi @Spheerys, thanks for your report.

I can reproduce it, already the preview fails when the string 'Je souhaite participer au projet' is passed as parameter to DateTimeImmutable. This is the stack trace.

{
  "reqId": "oG2OFVrZUIe7WqB8inPk",
  "level": 3,
  "time": "2025-01-06T16:19:30+00:00",
  "remoteAddr": "127.0.0.1",
  "user": "user1",
  "app": "tables",
  "method": "POST",
  "url": "/master/index.php/apps/tables/importupload-preview/table/885",
  "message": "An internal error or exception occurred: Failed to parse time string (Je souhaite participer au projet) at position 0 (J): The timezone could not be found in the database",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0",
  "version": "31.0.0.6",
  "exception": {
    "Exception": "DateMalformedStringException",
    "Message": "Failed to parse time string (Je souhaite participer au projet) at position 0 (J): The timezone could not be found in the database",
    "Code": 0,
    "Trace": [
      {
        "file": "/path/to/nextcloud/apps-repos/tables/lib/Service/ImportService.php",
        "line": 175,
        "function": "__construct",
        "class": "DateTimeImmutable",
        "type": "->",
        "args": [
          "Je souhaite participer au projet"
        ]
      },
      {
        "file": "/path/to/nextcloud/apps-repos/tables/lib/Service/ImportService.php",
        "line": 97,
        "function": "getPreviewData",
        "class": "OCA\\Tables\\Service\\ImportService",
        "type": "->",
        "args": [
          {
            "__class__": "PhpOffice\\PhpSpreadsheet\\Worksheet\\Worksheet"
          }
        ]
      },
      {
        "file": "/path/to/nextcloud/apps-repos/tables/lib/Controller/ImportController.php",
        "line": 98,
        "function": "previewImport",
        "class": "OCA\\Tables\\Service\\ImportService",
        "type": "->",
        "args": [
          885,
          null,
          "/tmp/phpgsDTsY"
        ]
      },
      {
        "file": "/path/to/nextcloud/apps-repos/tables/lib/Controller/Errors.php",
        "line": 22,
        "function": "OCA\\Tables\\Controller\\{closure}",
        "class": "OCA\\Tables\\Controller\\ImportController",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/path/to/nextcloud/apps-repos/tables/lib/Controller/ImportController.php",
        "line": 97,
        "function": "handleError",
        "class": "OCA\\Tables\\Controller\\ImportController",
        "type": "->",
        "args": [
          {
            "__class__": "Closure"
          }
        ]
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 200,
        "function": "previewUploadImportTable",
        "class": "OCA\\Tables\\Controller\\ImportController",
        "type": "->",
        "args": [
          885
        ]
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 114,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Tables\\Controller\\ImportController"
          },
          "previewUploadImportTable"
        ]
      },
      {
        "file": "/path/to/nextcloud/lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Tables\\Controller\\ImportController"
          },
          "previewUploadImportTable"
        ]
      },
      {
        "file": "/path/to/nextcloud/lib/private/Route/Router.php",
        "line": 306,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Tables\\Controller\\ImportController",
          "previewUploadImportTable",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          {
            "tableId": "885",
            "_route": "tables.import.previewuploadimporttable"
          }
        ]
      },
      {
        "file": "/path/to/nextcloud/lib/base.php",
        "line": 1019,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/tables/importupload-preview/table/885"
        ]
      },
      {
        "file": "/path/to/nextcloud/index.php",
        "line": 24,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/path/to/nextcloud/apps-repos/tables/lib/Service/ImportService.php",
    "Line": 175,
    "message": "An internal error or exception occurred: Failed to parse time string (Je souhaite participer au projet) at position 0 (J): The timezone could not be found in the database",
    "exception": {},
    "CustomMessage": "An internal error or exception occurred: Failed to parse time string (Je souhaite participer au projet) at position 0 (J): The timezone could not be found in the database"
  }
}

@blizzz blizzz self-assigned this Jan 6, 2025
@blizzz blizzz added 1. to develop Accepted and waiting to be taken care of import/export and removed 0. Needs triage Pending approval or rejection. This issue is pending approval. labels Jan 6, 2025
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Office team Jan 6, 2025
@blizzz blizzz linked a pull request Jan 16, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug Something isn't working import/export
Projects
Status: 🧭 Planning evaluation (don't pick)
Development

Successfully merging a pull request may close this issue.

2 participants