WordPress / playground-tools

GNU General Public License v2.0
138 stars 39 forks source link

Unhandled "TypeError: Cannot convert undefined or null to object" on new environment #259

Closed RWareSteve closed 4 months ago

RWareSteve commented 4 months ago

Here some details about the system I've setup:

... date : "2023-10-25", time : "12:25:59", os_group : "Linux", os_distribution : "ubuntu", os_distribution_version : "Ubuntu 22.04.2 LTS", os_based_distribution : "debian", os_based_distribution_version : "22.04", os_kernel : "5.15.90.1-microsoft-standard-WSL2", os_detailed_kernel : "Linux LenovoLap 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux", cpus_total : "1", cores_total : "2", cpu_types : "Intel(R)Core(TM)i7-3537UCPU@2.00GHz", cpu_architecture : "x86_64", ram_total : "4954888", disk_total : "1102040084480", ...

npm --version 10.5.0

node -v v20.12.2

php --version PHP 8.1.2-1ubuntu2.17 (cli) (built: May 1 2024 10:10:07) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.2, Copyright (c) Zend Technologies with Zend OPcache v8.1.2-1ubuntu2.17, Copyright (c), by Zend Technologies

wp-now --version 0.1.70

I only run following steps cd ~ = /home/wpdevuser mkdir dev cd dev mkdir demodir cd demodir

and launched wp-now for the first time wp-now start

wp-version 6.5.3

I opened the browser and called the website, (automatically login (admin / password): after 3 clicks an error happens: click on Pages click on Sample Page click on View Pages, no changes, only icon left upper corner click to return to previous page

following error is shown on console where "wp-now start" was launched:

... Server running at http://localhost:8881 Trace: TypeError: Cannot convert undefined or null to object at Function.entries () at encodeAsMultipart (file:///home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/main.js:922:38) at file:///home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/main.js:994:33 at Layer.handle [as handle_request] (/home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/node_modules/express/lib/router/index.js:328:13) at /home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/node_modules/express/lib/router/index.js:286:9 at Function.process_params (/home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/node_modules/express/lib/router/index.js:346:12) at next (/home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/node_modules/express/lib/router/index.js:280:10) at file:///home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/main.js:897:7 at Layer.handle [as handle_request] (/home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/node_modules/express/lib/router/index.js:328:13) at /home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/node_modules/express/lib/router/index.js:286:9 at Function.process_params (/home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/node_modules/express/lib/router/index.js:346:12) at next (/home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/node_modules/express/lib/router/index.js:280:10) at compression (/home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/node_modules/compression/index.js:220:5) at Layer.handle [as handle_request] (/home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/node_modules/express/lib/router/layer.js:95:5) at file:///home/wpdevuser/.nvm/versions/node/v20.12.2/lib/node_modules/@wp-now/wp-now/main.js:1017:15 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

The same happens if you click on posts, on one post and on View Posts = icon left upper corner.

The main reason to build the wp-now environment was to develop a new plugin, here "demodir". This folder is on call of "wp-now start" empty. So after getting the error and adding some test files to "demodir" the same issue happened.

Can I ignore this error ?

RWareSteve commented 4 months ago

Sorry, I forgot to share: I don't have Playground installed, just wp-now.

sejas commented 4 months ago

@RWareSteve, Thanks for reporting the issue. We have fixed it and released wp-now v0.1.71. You can try it by executing npx @wp-now/wp-now@latest start.

I confirmed that the error is gone on my side, so I'll close this issue. If it's not fixed on your end, just let me know.

Thanks again for reporting! wp-now is now better thanks to your help. 🙌

RWareSteve commented 4 months ago

Hi, Antonie, yes, you‘ve fixed. Well done and many thanks.

Mit freundlichen Grüßen

Stephan Roder

--

Alte Wipperfürther Str. 154

51467 Bergisch Gladbach

Mobil +49-157-57043295

Von: Antonio Sejas @.> Gesendet: Dienstag, 21. Mai 2024 17:38 An: WordPress/playground-tools @.> Cc: Stephan Roder @.>; Mention @.> Betreff: Re: [WordPress/playground-tools] Unhandled "TypeError: Cannot convert undefined or null to object" on new environment (Issue #259)

@RWareSteve https://github.com/RWareSteve , Thanks for reporting the issue. We have fixed it and released @./wp-now> wp-now v0.1.71. You can try it by executing npx @@. start.

I confirmed that the error is gone on my side, so I'll close this issue. If it's not fixed on your end, just let me know.

Thanks again for reporting! wp-now is now better thanks to your help. 🙌

— Reply to this email directly, view it on GitHub https://github.com/WordPress/playground-tools/issues/259#issuecomment-2122910120 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AK32JNX3NNLFDTAFX3TO7YTZDNS6PAVCNFSM6AAAAABHOVIDCWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRSHEYTAMJSGA . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AK32JNUDBDLLCKIUXYC3OWLZDNS6PA5CNFSM6AAAAABHOVIDCWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTT6REE2Q.gif Message ID: @. @.> >