emadow / mailspring-avatars

Avatars for Mailspring
13 stars 12 forks source link

Plugin broken #3

Open Chinney opened 6 years ago

Chinney commented 6 years ago

The plugin is not working for me (OS: Ubuntu 16.04)

I tracked it down to the React.Proptype component which seems to be undefined in avatar-image.jsx. I am currently trying to fix it.

Console Output:

TypeError: Cannot read property 'string' of undefined
    at Object.<anonymous> (avatar-image.jsx:172:16)
    at Object.<anonymous> (avatar-image.jsx:347:1)
    at Module._compile (module.js:569:30)
    at Object.value [as .jsx] (/snap/mailspring/180/usr/share/mailspring/resources/app.asar/src/compile-cache.js:145:21)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (avatar-factory.jsx:1:1)
    at Object.<anonymous> (avatar-factory.jsx:2:1)
    at Module._compile (module.js:569:30)
    at Object.value [as .jsx] (/snap/mailspring/180/usr/share/mailspring/resources/app.asar/src/compile-cache.js:145:21)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (main.es6:2:1)
    at Object.<anonymous> (main.es6:32:2)
    at Module._compile (module.js:569:30)
    at Object.value [as .es6] (/snap/mailspring/180/usr/share/mailspring/resources/app.asar/src/compile-cache.js:145:21)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Package.activate (/src/package.es6:39:22)
    at PackageManager.activatePackage (/src/package-manager.es6:105:9)
    at setTimeout (/src/package-manager.es6:74:14) Object {url: "/home/felix/snap/mailspring/common/packages/mailspring-avatars/lib/avatar-image.jsx", line: 164, column: 50, pluginIds: Array(0)}column: 50line: 164pluginIds: Array(0)url: "/home/felix/snap/mailspring/common/packages/mailspring-avatars/lib/avatar-image.jsx"__proto__: Objectconstructor: function Object()hasOwnProperty: function hasOwnProperty()isPrototypeOf: function isPrototypeOf()propertyIsEnumerable: function propertyIsEnumerable()toLocaleString: function toLocaleString()toString: function toString()valueOf: function valueOf()__defineGetter__: function __defineGetter__()__defineSetter__: function __defineSetter__()__lookupGetter__: function __lookupGetter__()__lookupSetter__: function __lookupSetter__()get __proto__: function __proto__()set __proto__: function __proto__()
module.exports.ErrorLogger.reportError @ /snap/mailspring/180/usr/share/mailspring/resources/app.asar/src/error-logger.js:101
reportError @ app-env.es6:233
window.onerror @ app-env.es6:151
avatar-image.jsx? [sm]:172 Uncaught TypeError: Cannot read property 'string' of undefined
    at Object.<anonymous> (avatar-image.jsx:172:16)
    at Object.<anonymous> (avatar-image.jsx:347:1)
    at Module._compile (module.js:569:30)
    at Object.value [as .jsx] (/snap/mailspring/180/usr/share/mailspring/resources/app.asar/src/compile-cache.js:145:21)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (avatar-factory.jsx:1:1)
    at Object.<anonymous> (avatar-factory.jsx:2:1)
    at Module._compile (module.js:569:30)
    at Object.value [as .jsx] (/snap/mailspring/180/usr/share/mailspring/resources/app.asar/src/compile-cache.js:145:21)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (main.es6:2:1)
    at Object.<anonymous> (main.es6:32:2)
    at Module._compile (module.js:569:30)
    at Object.value [as .es6] (/snap/mailspring/180/usr/share/mailspring/resources/app.asar/src/compile-cache.js:145:21)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Package.activate (/src/package.es6:39:22)
    at PackageManager.activatePackage (/src/package-manager.es6:105:9)
    at setTimeout (/src/package-manager.es6:74:14)
(anonymous) @ avatar-image.jsx? [sm]:172
(anonymous) @ avatar-image.jsx? [sm]:347
Chinney commented 6 years ago

Also consider this: https://github.com/reactjs/react-rails/issues/825

Chinney commented 6 years ago

Seems like this is an deprecation issue. Components like React.PropTypes and React.createClass are no longer part of the main react module. instead they have been moved into seperate modules. I fixed it locally. I installed and used the following packages insted:

react
proto-types
create-react-class

I know this is not a pretty solution but I'm kinda new to react. Maybe someone with more experience have a look into this and use the mailspring react components instead of local ones? Cheers!

Striffly commented 6 years ago

Fixed on my fork : https://github.com/Striffly/mailspring-avatars/commit/a74fcebb5bae20597fa245f1a183f68d1154b596

kriskhaira commented 6 years ago

@Striffly Your fork works for me, although I get this minor layout issue where the unread icon overlaps over the name of the email sender.

screen shot 2018-09-24 at 4 28 16 am

I'm on the latest Mailspring (Version 1.4.2).

Striffly commented 6 years ago

@Striffly Your fork works for me, although I get this minor layout issue where the unread icon overlaps over the name of the email sender.

screen shot 2018-09-24 at 4 28 16 am

I'm on the latest Mailspring (Version 1.4.2).

Fixed ! https://github.com/Striffly/mailspring-avatars/commit/876280b676c1308b3280de05a646737932bd7807

paulgaumer commented 5 years ago

Hi, thanks a lot @Striffly for adapting this plugin! It doesn't seem to work with Mailspring 1.6.1 though, I don't have any avatars appear in my email list. Does it work for you?

Striffly commented 5 years ago

Hi @paulgaumer

Same thing for me, I don't find solution for the moment 😕

Striffly commented 4 years ago

Plugin fixed here : https://github.com/Striffly/mailspring-avatars Due to the inactivity of the author, please go here for future issues.