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

"Can't parse feed item:" flooding log, disable this or make a debug level #1329

Closed
flyingchipmunk opened this issue Jun 24, 2018 · 5 comments

Comments

@flyingchipmunk
Copy link
Contributor

flyingchipmunk commented Jun 24, 2018

Platform:
Raspberry Pi 3B+, electron 1.7.13

Node Version:
v9.11.2

MagicMirror Version:
v2.3.1

Description:
The ~/.pm2/logs/MagicMirror-out-0.log is getting flooded with "Can't parse feed item:" messages from the default/newsfeed module. Regardless of source of the newsfeeds that can't be parsed this message needs to be removed or set to a debug level and a flag to enable it. On a production installation this should not be printing as console.log(). On an unchecked system this will flood the log file and speed the destruction of the sdcard with unneeded writes.

Steps to Reproduce:
Leave the default NYT RSS feed that fetcher.js can't parse, i.e. http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml and watch the log for the errors.

Expected Results:
No log messages written unless a fatal operation has occurred.

Actual Results:
Messages like this flood the out.log

Can't parse feed item:
{ title: '',
  link: 'https://www.nytimes.com//?partner=rss&emc=rss',
  guid: { ispermalink: 'true', text: 'https://www.nytimes.com//' },
  'atom:link':
   { rel: 'standout',
     href: 'https://www.nytimes.com//?partner=rss&emc=rss' },
  description: '',
  'dc:creator': '',
  pubdate: '' }
Title:
Description:
Pubdate: undefined

Configuration:

        {
            module: "newsfeed",
            position: "bottom_bar",
            config: {
                feeds: [
                    {
                        title: "New York Times",
                        url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
                    }
                ],
                showSourceTitle: true,
                showPublishDate: true
            }
        },

Additional Notes:

@almazini
Copy link

I met the same issue today on Raspberry 3 today

@MichMich
Copy link
Collaborator

Feel free to send a PR to disable this using a configuration option.

@flyingchipmunk
Copy link
Contributor Author

I briefly looked at how you implemented the logger class on the non-module side of the code. Didn't know if there were plans to expand that to modules. If not, and a config option for this module would be acceptable for this I can work up a PR for it.

@MichMich
Copy link
Collaborator

Yeah for now a config option would be the easiest solution. Thanks!

flyingchipmunk added a commit to flyingchipmunk/MagicMirror that referenced this issue Jun 27, 2018
- 'logFeedWarnings' added to newsfeed config, defaulted to false
- Only log parse feed errors when logFeedWarnings is true
- Updated README and CHANGELOG
- Fixes MagicMirrorOrg#1329
@MichMich
Copy link
Collaborator

Merged

chrisotto6 added a commit to chrisotto6/MagicMirror that referenced this issue Jan 4, 2019
* Fixed coloredSymbolOnly

* Changed weatherforecast to use dt_txt field

* New calendar display format with date headers for days and times listed next to events for that date

IE:

Sunday, May 1st
  2:00 pm       Soccer
  4:00 pm       Basketball

* fix missing s on timeFormat

* fix linting errors.  add line to changelog

* Upgrade to Electron 2.0.0.

* Update README.md

Included /home/pi/MagicMirror/ path when copying config.js.sample and running npm run config:check

* Fixes MagicMirrorOrg#1282.
Added a runtime var isShowingDescription that gets reset to user config.
this.config.showDescription no longer mutates during runtime.
Changelog has been updated to include this fix.

* fix moment, add unit filter

* start with forecast template

* Add information about the Electron update.

* Add note to README.md

Add note to README.md to not add calendars that have entries before 1st January 1970.

* add and lint clientonly

* Changelog

* Ability to fetch compliments from a remote server

* Add regex filtering to calendar module

* invoke callback for suspend notification, even if no dom content

* fix tabs

* update changelog

* fix changelog

* Revert "fix changelog"

This reverts commit c3f03e3.

* Style change.

* remove trailing spaces from reformatted else

* Customize classes for table

MagicMirror offers helper classes in the main.css. Therefore, we give
the possibility to indicate the class that we want.

* Update .gitignore

* Add changelog

* README updated

Update of README for the new option.

* ESLint format

Resolve format ith eslint

* Tabs and spaces from the original files

With a diff, here the orginal tabulations.

* show indoor data, add loading message

* minor typo in position fixed.

* Add option to newsfeed for logging errors

- 'logFeedWarnings' added to newsfeed config, defaulted to false
- Only log parse feed errors when logFeedWarnings is true
- Updated README and CHANGELOG
- Fixes MagicMirrorOrg#1329

* Fix locale id zh_cn -> zh-cn, zh_tw -> zh-tw, pt_br -> pt-br

* Update CHANGELOG.md

* Add update translations.

* Update CHANGELOG.md

* Correct the "Raspberry Pi" link in the ToC.

* Fixed Heat Index for Kelvin

* Fixed Wind Chill in Kelvin

* Updated changelog

* Updated changelog

* Prepare to release 2.4.0

* Setup the next release (2.5.0).

* indoor data, new filter, small cleanup

* Fixed parsing date, as dt_txt is missing from certain weather API results

* Prepare for release 2.4.1

* Prepare for 2.5.0

* Abillity to toggle article in fullscreen

* Swedish translation for "FEELS"

* Update CHANGELOG.md

* Update CHANGELOG.md

* Add some translations (mostly french).

* Wrong mixup… (cf german and spanish)

Thanks fewieden.

* CHANGELOG

* ADDED: Missing Hungarian localization for the "WEEK" resource key.

* ADDED: Missing Hungarian localization for the "FEELS" resource key.

* CHANGED: The Hungarian localization of the updatenotification module is changed to be more natural, because the existing messages felt like they were created with machine translation, and they were not only unnatural, but also misleading.

* UPDATED: The CHANGELOG.md file with description of the changes in the Hungarian localization.

* Added Spanish translation for "FEELS"

* Classes for alert module

Use of classes instead of inline style. With those modifications, it will be easier to personnalize the alert with custom.css

* Changelog.md updated

* Update nb.json

Added translation for "FEELS"

* Update nn.json

Added translation for "FEELS"

* Added an if to use absolute dates with all events

* Added also description of the change to changelog

* weatherforecast rainfall rounding

* Update CHANGELOG.md

* Fix ES6 syntax bug on RaspberryPi Zero W

Following this issue MagicMirrorOrg#694 it seems that the Midori Browser does not recoginize ES6 syntax. Further, the use of 'var' is seen throughout the calendar module excpet on line 439, where the error is reported

* Add patch note to CHANGELOG.md

* Fix link for finding cities in OpenWeather

* Update Changelog for weather city link

* Update sv.json

Small changes. Added "FEELS": "Känns som".

* ClientOnly: Global variable name used in callback function. 

The global 'config' variable is used in the callback function, changed to local one. Unwanted behaviour when accessing server on docker or if using 0.0.0.0 or blank address in config file as it just passes this to electron to display.

* Update CHANGELOG.md

* consider events lasting several full days as full day events

* Correct changelog entry.

* added support for events having a duration instead of an end

* added support for showing end of events through config parameters showEnd and dateEndFormat

* Update CHANGELOG.md

* Updating "feels" translation

* Polish translate for "Feels"

* Update pl.json

* CHANGED: The COMMIT_COUNT placeholder in the UPDATE_INFO message of the UpdateNotification module does not contain the word "commit" or "commits" any more, so language files can independently localize them.

* ADDED: CHANGELOG entry.

* CHANGED: The UPDATE_INFO key in the localization file is changed to UPDATE_INFO_SINGLE and UPDATE_INFO_MULTIPLE to allow different localization for single and multiple commits.

* FIXED: Character encoding issue in pl.json occurred during rebase.

* CHANGED: The wording in CHANGELOG is modified to be more descriptive.

* Add gzip support to calendar fetcher.

* update changelog with gzip calendar fix

* Merge upstream/develop

* update CHANGELOG.md adding gzip fix for calendar module

* Update zh-cn translation to 2.5.0

* Update CHANGELOG.md for zh-cn translation updates.

* Support multi-line compliments.

* Update CHANGELOG.md with multi-line compliments support.

* Replace innerHTML() with createElement() and appendChild() for security.

* Update compliments README.md for multi-line support.

* Use 'white-space: pre-line' for multi-line compliment.

* Prepare for release 2.5.0

* Details to install the latest version of Node.js

Added the direct code to always install the latest version of Node.js for the manual installation.
Maybe you could also include this in the automatic setup script, which does not seem to install the latest version of Node.js.

* Prepare for 2.6.0-dev.

* Allow to parse recurring calendar events where the start date is before 1970

Some birthday calendar events have a start date before 1970.

* Allow to parse recurring calendar events where the start date is before 1970

Some birthday calendar events have a start date before 1970.

* Allow to parse recurring calendar events where the start date is before 1900

Some birthday calendar events have a start date before 1900.

* - Possibility to add classes to the cell of symbol, title and time of the events of calendar.

* Update README.md

* Update README.md

* * Added font awesome 5, keeping shims in place for the calendar app (https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4)
* Updated example sample config

* Updated changelog

* Spaces to tab

* Added in 5 day forecast screenshot

* Added in screenshot for current weather module.

* Added in screenshot

* Added in compliments screenshot

* Added in screenshot for the newfeed module

* (doc) showEnd config

Add documentation for showEnd configuration

* Update CHANGELOG.md

* Fixed README formatting errors.

* Fix Broken Link

http://www.openweathermap.org/help/city_list.txt is a dead link, suggest replacing with https://openweathermap.org/city

* fix polish translation

* Change showEnd default to false.

* Fixed eslint issues

.. as requested in Pull Request MagicMirrorOrg#1424

* Portuguese translation for "Feels"

* Ignore rrule errors

* Update CHANGELOG.md

* Fading for dateheaders

Included fading for dateheaders option
Removed unnecessary switch statement in dateheaders option

* Update CHANGELOG.md

- Fading for dateheaders timeFormat in Calendar [MagicMirrorOrg#1464](MagicMirrorOrg#1464)
- Bug showing FullDayEvents one day too long in calendar fixe

* formatting corrected

Corrected formatting due to Travis CI errors

* Update README.md

Typo

* Create hr.json

Croatian translation.

* Update CHANGELOG.md

Added Croatian translation to the changelog.

* Update translations.js

Added Croatian.

* Initial

* Add issue number to changelog

* CHANGED: The Weather Forecast module by default displays the ° symbol after every numeric value to be consistent with the Current Weather module.

* Add ajv dependency to fix linting error.

* Document endTime variables

Missed docs in MagicMirrorOrg@188aa14

Signed-off-by: David Galloway <[email protected]>

* weatherprovider

* small improvements

* forecast

* darksky forecast and darksky current weather fixes

* config options and documentation

* cleanup

* Add changelog entry

* add unit and language handling for weather provider darksky

* Update ro.json

* Update CHANGELOG.md

* fixed darksky metric units

* fixed beaufortwindspeed for imperial units

* add original feels like temperature and fixed it for imperial units

* Update README.md

Wrong delimiter used for electronOptions. Use : instead of =.

* fix rain amount information for different units and providers, documentation

* link provider readme in module readme

* Prepare for release 2.6.0.

* Upgrade Electron to 2.0.16

* Additional update info.

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

No branches or pull requests

3 participants