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

Conto Manager Error "Parse error on line 1: Deprecated: Not prov ^ Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE'" #2525 #612

Closed
Kahmoon opened this issue Nov 26, 2020 · 19 comments
Labels
Milestone

Comments

@Kahmoon
Copy link

Kahmoon commented Nov 26, 2020

Affected version(s)
Contao 4.10.4
Ionos Hosting
PHP 7.4.12

Description

When i open Contao manager i get an error overlay without having done any changes. 2 days ago there was no error.

Bildschirmfoto 2020-11-26 um 08 56 35

When i try to navigate to Maintanance i see the row from debug mode refreshing and when its done the error overlay appears. In the background i can see this strange message.
Bildschirmfoto 2020-11-26 um 13 17 49

Errorlog
[26-Nov-2020 11:25:16 Europe/Berlin] [2020-11-26 11:25:16] app.CRITICAL: Uncaught PHP Exception Seld\JsonLint\ParsingException: "Parse error on line 1: Deprecated: Not prov ^ Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['" at phar:///homepages/46/d346729057/htdocs/meinedomain-dev/web/contao-manager.phar.php/vendor/seld/jsonlint/src/Seld/JsonLint/JsonParser.php line 339 {"exception":"[object] (Seld\\JsonLint\\ParsingException(code: 0): Parse error on line 1:\nDeprecated: Not prov\n^\nExpected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[' at phar:///homepages/46/d346729057/htdocs/meinedomain-dev/web/contao-manager.phar.php/vendor/seld/jsonlint/src/Seld/JsonLint/JsonParser.php:339)"} []

What i tried since yet

  • I tried to upload a news contao-manager-phar.php.
  • I totally deleted the contao-manager folder.

I don´t know how to describe this behaviour better.

@aschempp
Copy link
Member

Looks like your composer.json or composer.lock file has been changed and is not valid anymore.

@Kahmoon
Copy link
Author

Kahmoon commented Nov 26, 2020

I copied one from my other installations which does not have this error and copy pasted the extensions....same error

This is my composer.json

{
    "type": "project",
    "require": {
        "bugbuster/contao-dlstats-bundle": "^1.0",
        "codefog/contao-cookiebar": "^2.1",
        "codefog/contao-events_subscriptions": "^2.3",
        "contao-bootstrap/core": "^2.0",
        "contao-bootstrap/grid": "^2.0",
        "contao-bootstrap/layout": "^2.0",
        "contao-bootstrap/navbar": "^2.1",
        "contao/calendar-bundle": "4.10.*",
        "contao/comments-bundle": "4.10.*",
        "contao/conflicts": "*@dev",
        "contao/faq-bundle": "4.10.*",
        "contao/listing-bundle": "4.10.*",
        "contao/manager-bundle": "4.10.*",
        "contao/news-bundle": "4.10.*",
        "contao/newsletter-bundle": "4.10.*",
        "dklemmt/contao_dk_mmenu": "^3.0",
        "do-while/contao-backupdb-bundle": "^1.3",
        "erdmannfreunde/euf_overlay": "^1.3",
        "frank-berger/events-subscriptions": "1.0.4",
        "heimrichhannot/contao-teaser-bundle": "^1.0.0",
        "hofff/contao-calendarfield": "^3.0",
        "jrgregory/m17-sticky-backend-footer": "^2.0",
        "kmielke/calendar-extended-bundle": "^1.0",
        "madeyourday/contao-rocksolid-custom-elements": "^2.2",
        "madeyourday/contao-rocksolid-frontend-helper": "^2.0",
        "markocupic/resource-booking-bundle": "^2.4",
        "netzmacht/contao-font-awesome-inserttag": "^2.0",
        "omosde/contao-om-backend": "^1.6",
        "oneup/contao-ical-export": "^2.0",
        "phpoffice/phpspreadsheet": "^1.14",
        "terminal42/contao-easy_themes": "^2.2",
        "terminal42/contao-leads": ">=1.4.10.0,<1.5-dev",
        "terminal42/contao-pageimage": ">=3.3.0.0,<3.4-dev",
        "terminal42/notification_center": "^1.4"
    },
    "extra": {
        "contao-component-dir": "assets"
    },
    "conflict": {
        "doctrine/dbal": "2.9.1|2.9.2"
    },
    "scripts": {
        "post-install-cmd": [
            "Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
        ],
        "post-update-cmd": [
            "Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
        ]
    }
}

@aschempp
Copy link
Member

We've had the same issue recently in Slack. It looks like deprecation warnings are shown, which is likely a (wrong) configuration of the server.

@pressi
Copy link

pressi commented Nov 28, 2020

Ich hatte das Problem heute auch.
Nachdem löschen der Cookies hat alles wieder einwandfrei funktioniert.
Alle anderen Maßnahmen brachten nichts, auch das löschen des contao-manager Ordners und das überschreiben der contao-manager.phar.php Datei hatte nichts gebracht.

@Kahmoon
Copy link
Author

Kahmoon commented Nov 29, 2020

We've had the same issue recently in Slack. It looks like deprecation warnings are shown, which is likely a (wrong) configuration of the server.

I have several installations at the same hosting. Just two of them show this error. In this case live and dev site of one domain .

I will try the advice with cookies

@Kahmoon
Copy link
Author

Kahmoon commented Nov 29, 2020

Delete all cookies of this domain did help...thx

@BBmt89
Copy link

BBmt89 commented Nov 30, 2020

Hello, i have the same issue. (Contao 4.9.3)
This happens only if you activate the Debug Modus (and doesnt dissapear when you deactivate it again) So if i delete the cookies it works until i activate the debug modus again.

it also shows following errors in front and backend. (just visible for me when logged in and debug modus is/was active)

Deprecated: Not providing the current time is deprecated. Please pass an instance of DateTimeInterface. in /xxx/public/vendor/lcobucci/jwt/src/Token.php on line 296

Deprecated: Implicit conversion of keys from strings is deprecated. Please use InMemory or LocalFileReference classes. in /xxx/public/vendor/lcobucci/jwt/src/Signer/BaseSigner.php on line 57

@BBmt89
Copy link

BBmt89 commented Dec 3, 2020

We've had the same issue recently in Slack. It looks like deprecation warnings are shown, which is likely a (wrong) configuration of the server.

Can you tell me which configuration exactly?

@johannes-bittner
Copy link

I ran into the same issue. After deleting the cookies and in debug mode, I get the following error message:

The cookie name "Deprecated: Using integers for registered date claims is deprecated, please use DateTimeImmutable objects instead. in /xxx/vendor/lcobucci/jwt/src/Builder.php on line 151 Deprecated: Using integers for registered date claims is deprecated, please use DateTimeImmutable objects instead. in /xxx/vendor/lcobucci/jwt/src/Builder.php on line 151 Deprecated: Implicit conversion of keys from strings is deprecated. Please use InMemory or LocalFileReference classes. in /xxx/vendor/lcobucci/jwt/src/Builder.php on line 471 Deprecated: Not specifying the signer and key to Builder#getToken() is deprecated. Please move the arguments from Builder#sign() to Builder#getToken(). in /xxx/vendor/lcobucci/jwt/src/Builder.php on line 506 contao_settings" contains invalid characters.

DomainFactory, PHP 7.3.10, Contao 4.9.9

@fritzmg
Copy link
Contributor

fritzmg commented Dec 7, 2020

@aschempp aschempp reopened this Dec 9, 2020
@aschempp aschempp added the bug label Dec 9, 2020
@aschempp aschempp added this to the 1.3.4 milestone Dec 9, 2020
@fritzmg
Copy link
Contributor

fritzmg commented Dec 20, 2020

It looks like deprecation warnings are shown, which is likely a (wrong) configuration of the server.

I did notice that some server environments do allow E_USER_DEPRECATED to be shown on the CLI, e.g. Hostingwerk (not sure if that is by mistake).

@leofeyer
Copy link
Member

We are using the default settings on the Hostingwerk servers:

; error_reporting
;   Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;   Development Value: E_ALL
;   Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

@fritzmg
Copy link
Contributor

fritzmg commented Dec 21, 2020

Yep, and so do most hosters, presumably. And it does not exclude E_USER_DEPRECATED.

» lcobucci/jwt#550 (comment)

The gist from there is that productive environments should (at least) use E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED.

@aschempp aschempp modified the milestones: 1.3.4, 1.4.0 Jan 6, 2021
@aschempp
Copy link
Member

aschempp commented Jan 7, 2021

If I understand you correct in contao/contao#1941 (review) @fritzmg this issue has to and has/will be fixed in Contao core?

@aschempp
Copy link
Member

aschempp commented Jan 7, 2021

I have also implemented a fix in 4e7e200 that should generally ignore such CLI messages in the Contao Manager.

@aschempp aschempp closed this as completed Jan 7, 2021
@fritzmg
Copy link
Contributor

fritzmg commented Jan 7, 2021

If I understand you correct in contao/contao#1941 (review) @fritzmg this issue has to and has/will be fixed in Contao core?

That still needs to be discussed. The issue occurs due to the "recommended" PHP error_reporting setting for production environments, which do not exclude E_USER_DEPRECATED. This is not a problem in the front or back end, because Contao sets its own error_reporting setting there. However, the CLI does not adjust this.

I have not created an issue or PR about this yet, as I still need to actually test it.

@bohnmedia
Copy link

bohnmedia commented Jan 7, 2021

Disabling error_reporting in my php configuration didnt help. I guess, the problem is the third line in the contao-manager.phar.

error_reporting(-1);

I tried to remove the line, but after that the contao manager didnt work anymore.

@bohnmedia
Copy link

bohnmedia commented Jan 7, 2021

Ok, wenn I run the script with shell_exec the PHP settings in the control panel have no effect. So I cant change these settings at my provider. I downloaded the contao-manager.phar.php from https://contao.org/de/download.html but still get the error. Is the file already updated somewhere?

@fritzmg
Copy link
Contributor

fritzmg commented Jan 7, 2021

Is the file already updated somewhere?

There is no new release yet. Once released, the Contao Manager will update itself automatically.

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

No branches or pull requests

7 participants