Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Warning: componentWillReceiveProps has been renamed, and is not recommended for use. #2680

Open
1 task done
icecream17 opened this issue May 14, 2021 · 1 comment · May be fixed by #2681
Open
1 task done

Warning: componentWillReceiveProps has been renamed, and is not recommended for use. #2680

icecream17 opened this issue May 14, 2021 · 1 comment · May be fixed by #2681

Comments

@icecream17
Copy link
Contributor

This is on a new reinstallation of atom-beta.

image

Prerequisites

Description

See image above

Steps to Reproduce

  1. install atom-beta
  2. add atom-beta to path
  3. atom-beta --dev --safe (--dev might be optional, this is just a random warning)
  4. ctrl+shift+i
  5. Tada! Warning message right in the console

Expected behavior:

n/a

Actual behavior:

warning

Reproduces how often:

always

Versions

Maybe I should'nt've reinstalled atom-beta...

C:\Users\Steven>atom-beta --version

C:\Users\Steven>apm-beta --version
'apm-beta' is not recognized as an internal or external command,
operable program or batch file.
> navigator.userAgent
< "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Atom/1.58.0-beta0 Chrome/83.0.4103.122 Electron/9.4.4 Safari/537.36"

Anyways, system: Windows 10 x64

Additional Information

I reinstalled atom using chocolatey

I got the big stacktrace by reloading

right click on warning > save as... > ok, -1620957739628.log:

unrelated part, but maybe look at this later
electron/js2c/renderer_init.js:15 (electron) crashReporter.start is deprecated in the renderer process. Call it from the main process instead.
log @ electron/js2c/renderer_init.js:15
start @ electron/js2c/renderer_init.js:63
module.exports @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\crash-reporter-start.js:10
setupWindow @ index.js:155
window.onload @ index.js:106
load (async)
(anonymous) @ index.js:23
(anonymous) @ index.js:217
styles-element.coffee:82 [Deprecation] document.registerElement is deprecated and will be removed in M80, around February 2020. Please use window.customElements.define instead. See https://www.chromestatus.com/features/4642138092470272 and https://developers.google.com/web/updates/2019/07/web-components-time-to-upgrade for more details.
(anonymous) @ styles-element.coffee:3
(anonymous) @ styles-element.coffee:1
(anonymous) @ styles-element.coffee:1
Module._compile @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\native-compile-cache.js:120
value @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\compile-cache.js:255
Module.load @ internal/modules/cjs/loader.js:815
Module._load @ internal/modules/cjs/loader.js:727
Module._load @ electron/js2c/asar.js:769
Module.require @ internal/modules/cjs/loader.js:852
require @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\native-compile-cache.js:67
(anonymous) @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\style-manager.js:7
(anonymous) @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\style-manager.js:380
Module._compile @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\native-compile-cache.js:120
value @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\compile-cache.js:255
Module.load @ internal/modules/cjs/loader.js:815
Module._load @ internal/modules/cjs/loader.js:727
Module._load @ electron/js2c/asar.js:769
Module.require @ internal/modules/cjs/loader.js:852
require @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\native-compile-cache.js:67
(anonymous) @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\atom-environment.js:28
(anonymous) @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\atom-environment.js:1769
Module._compile @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\native-compile-cache.js:120
value @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\compile-cache.js:255
Module.load @ internal/modules/cjs/loader.js:815
Module._load @ internal/modules/cjs/loader.js:727
Module._load @ electron/js2c/asar.js:769
Module.require @ internal/modules/cjs/loader.js:852
require @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\native-compile-cache.js:67
(anonymous) @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\initialize-application-window.js:1
(anonymous) @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\initialize-application-window.js:121
Module._compile @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\native-compile-cache.js:120
value @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\compile-cache.js:255
Module.load @ internal/modules/cjs/loader.js:815
Module._load @ internal/modules/cjs/loader.js:727
Module._load @ electron/js2c/asar.js:769
Module.require @ internal/modules/cjs/loader.js:852
require @ internal/modules/cjs/helpers.js:74
setupWindow @ index.js:171
window.onload @ index.js:106
load (async)
(anonymous) @ index.js:23
(anonymous) @ index.js:217
Show 9 more frames
C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:27773 Download the React DevTools for a better development experience: https://fb.me/react-devtoolsYou might need to use a local HTTP server (instead of file://): https://fb.me/react-devtools-faq
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/focus-trap.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/index.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/purify.cjs.js.map: 
index.js:23 [Violation] 'load' handler took 2118ms
[Violation] Forced reflow while executing JavaScript took 105ms
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/index.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/git-process.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/errors.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/git-environment.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/index.js.map: 

Part 2: relevant

C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:12357 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: Command
printWarning @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:12357
lowPriorityWarningWithoutStack @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:12378
ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:12548
flushRenderPhaseStrictModeWarningsInDEV @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:25689
commitRootImpl @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:24937
unstable_runWithPriority @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\scheduler\cjs\scheduler.development.js:697
runWithPriority$2 @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:12149
commitRoot @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:24922
finishSyncRender @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:24329
performSyncWorkOnRoot @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:24307
scheduleUpdateOnFiber @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:23698
updateContainer @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:27103
(anonymous) @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:27528
unbatchedUpdates @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:24433
legacyRenderSubtreeIntoContainer @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:27527
render @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:27608
GithubPackage.renderFn @ github-package.js:89
rerender @ github-package.js:300
activate @ github-package.js:248
async function (async)
activate @ github-package.js:167
activateNow @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\package.js:242
(anonymous) @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\package.js:211
measure @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\package.js:82
(anonymous) @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\package.js:205
activate @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\package.js:203
activatePackage @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\package-manager.js:812
(anonymous) @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\package-manager.js:787
transactAsync @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\config.js:925
activatePackages @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\package-manager.js:785
activate @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\package-manager.js:762
(anonymous) @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\atom-environment.js:1021
async function (async)
(anonymous) @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\atom-environment.js:896
Promise.then (async)
startEditorWindow @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\atom-environment.js:890
module.exports @ C:\Users\Steven\AppData\Local\atom-beta\app-1.58.0-beta0\resources\app.asar\src\initialize-application-window.js:109
setupWindow @ index.js:175
window.onload @ index.js:106
load (async)
(anonymous) @ index.js:23
(anonymous) @ index.js:217
Part 3: more warnings
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/index.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/uuid.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/indexeddb.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/util.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/memory.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/purify.cjs.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/uri.all.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar/static/performance-now.js.map: 
electron/js2c/renderer_init.js:131 Uncaught (in promise) Error: ERR_FILE_NOT_FOUND (-6) loading 'file:///C:/Users/Steven/AppData/Local/atom-beta/app-1.58.0-beta0/resources/app.asar.unpacked/node_modules/github/lib/renderer.html?js=C%3A%5CUsers%5CSteven%5CAppData%5CLocal%5Catom-beta%5Capp-1.58.0-beta0%5Cresources%5Capp.asar.unpacked%5Cnode_modules%5Cgithub%5Clib%5Cworker.js&managerWebContentsId=1&operationCountLimit=10&channelName=github%3Arenderer-ipc'
    at rejectAndCleanup (electron/js2c/browser_init.js:225:1288)
    at WebContents.failListener (electron/js2c/browser_init.js:225:1505)
    at WebContents.emit (events.js:223:5)

apply @ electron/js2c/renderer_init.js:131
(anonymous) @ electron/js2c/renderer_init.js:83
(anonymous) @ electron/js2c/renderer_init.js:83
(anonymous) @ electron/js2c/renderer_init.js:127
emit @ events.js:223
onMessage @ electron/js2c/renderer_init.js:115
relay-network-layer-manager.js:21 GitHub API Rate Limit: 4996/5000 — resets in 23 minutes

File mentioned in stacktrace:
image

Which imports RootController from here:
image

Which imports Command:
image

Finally
image

@icecream17 icecream17 linked a pull request May 14, 2021 that will close this issue
@icecream17
Copy link
Contributor Author

icecream17 commented May 14, 2021

Update: See #2681 (review)
"It looks like we have another use of componentWillReceiveProps in the codebase, though. Can we leave the linked issue open until that's converted, as well?"

Unfortunately my commit says "Fix", so I'll just reopen when the commit is merged
Edit: (or maybe just replace all of them...)

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

Successfully merging a pull request may close this issue.

1 participant