question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with context storage

See original GitHub issue

Problem/Motivation

I am using the possibility of persistent context data storage on localfilesystem by including following lines in settings.js:

 contextStorage: {
     default: {
         module: "localfilesystem"
     }
  },

After upgrading to nodered addon V:10.1.0, I can see in the logs:

image

It says that persistent storage method is not specified, but from my testing, it appears that persistent data storage is really working, as expected from configuration settings and despite the log message.

Expected behavior

If persistent data storage is specified and working as per configuration settings, the log message should reflect this and not say that it is disabled.

Actual behavior

Log Message says that persistent storage method is not specified, while such method is correctly specified in settings.js and verified to be working ok.

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

Correct log message for persistent storage method

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
guenter-mscommented, Dec 5, 2021

I have inserted in /config/nodered/settings.js those lines:

// configure contextStorage

contextStorage: { default: “file”, memoryOnly: { module: ‘memory’ }, file: { module: ‘localfilesystem’ } },

This makes it persistent and selects “file” as default when storing context data:

Bildschirmfoto 2021-12-05 um 11 01 19

Persistent context data is saved in the backup data and therefore can be restored.

0reactions
github-actions[bot]commented, Jan 5, 2022

There hasn’t been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Context with store has been broken since 6.0.0 #1645 - GitHub
The most common issue was actually with third-party libraries that were trying (and now failing) to access the store directly. Notable examples ...
Read more >
The Problem with React's Context API | Strings and Things
The problem with context is simple: Everything that consumes a context re-renders everytime that context's state changes. That means that if ...
Read more >
Pitfalls of overusing React Context - LogRocket Blog
However, React Context has some pitfalls and overusing it can lead to performance issues. In this tutorial, we'll review the potential ...
Read more >
Local context storage not intended for large data arrays?
I am storing very large data arrays (about array[8000] with some 20+ objects per entry) in the global context storage. I have set...
Read more >
Context - React
The way changes are determined can cause some issues when passing objects as value : see Caveats. Class.contextType. class MyClass extends React.Component ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found