FS#62485 - [atom] markdown extensions broken since update to 1.36.0

Attached to Project: Community Packages
Opened by Daniel Morgan (scarwire) - Saturday, 27 April 2019, 10:30 GMT
Last edited by Nicola Squartini (tensor5) - Saturday, 09 November 2019, 06:54 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Nicola Squartini (tensor5)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

Updating atom to 1.36.0 breaks two extensions that I use a lot for editing markdown: `markdown-preview-enhanced` and `markdown-scroll-sync`. The probalem can be solved by switching to the `atom-editor-bin` AUR package, which is basically taken directly from the official debian package. Therefore I'm guessing there's some kind of packaging problem in the archlinux community version.

Steps to reproduce:
- install `markdown-preview-enhanced` and `markdown-scroll-sync` extensions in atom
- open a markdown file for editing
- activate preview (shortcut: ctrl-shift-m)

Stack trace from markdown-preview-enhanced:

```
Failed to activate the markdown-preview-enhanced package

At Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".

EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".

at Function (<anonymous>)
at field (/packages/markdown-preview-enhanced/node_modules/vega-util/build/vega-util.js:110:7)
at /packages/markdown-preview-enhanced/node_modules/vega-util/build/vega-util.js:118:12
at /packages/markdown-preview-enhanced/node_modules/vega-util/build/vega-util.js:2:66
at /packages/markdown-preview-enhanced/node_modules/vega-util/build/vega-util.js:5:2)
at /packages/markdown-preview-enhanced/node_modules/vega-util/build/vega-util.js:814:3)
at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
at Module.load (internal/modules/cjs/loader.js:602:32)
at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
at Function.Module._load (internal/modules/cjs/loader.js:533:3)
at Module.require (internal/modules/cjs/loader.js:640:17)
at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
at /packages/markdown-preview-enhanced/node_modules/vega-loader/build/vega-loader.node.js:5:16)
at /packages/markdown-preview-enhanced/node_modules/vega-loader/build/vega-loader.node.js:416:3)
at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
at Module.load (internal/modules/cjs/loader.js:602:32)
at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
at Function.Module._load (internal/modules/cjs/loader.js:533:3)
at Module.require (internal/modules/cjs/loader.js:640:17)
at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
at /packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/vega.js:12:23)
at /packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/vega.js:62:3)
at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
at Module.load (internal/modules/cjs/loader.js:602:32)
at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
at Function.Module._load (internal/modules/cjs/loader.js:533:3)
at Module.require (internal/modules/cjs/loader.js:640:17)
at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
at /packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/process-graphs.js:19:17)
at /packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/process-graphs.js:278:3)
at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
at Module.load (internal/modules/cjs/loader.js:602:32)
at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
at Function.Module._load (internal/modules/cjs/loader.js:533:3)
at Module.require (internal/modules/cjs/loader.js:640:17)
at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
at /packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/markdown-convert.js:18:26)
at /packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/markdown-convert.js:237:3)
at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
at Module.load (internal/modules/cjs/loader.js:602:32)
at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
at Function.Module._load (internal/modules/cjs/loader.js:533:3)
at Module.require (internal/modules/cjs/loader.js:640:17)
at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
at /packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/markdown-engine.js:20:28)
at /packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/markdown-engine.js:2124:3)
at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
at Module.load (internal/modules/cjs/loader.js:602:32)
at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
at Function.Module._load (internal/modules/cjs/loader.js:533:3)
at Module.require (internal/modules/cjs/loader.js:640:17)
at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
at /packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/mume.js:22:25)
at /packages/markdown-preview-enhanced/node_modules/@shd101wyy/mume/out/src/mume.js:102:3)
at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
at Module.load (internal/modules/cjs/loader.js:602:32)
at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
at Function.Module._load (internal/modules/cjs/loader.js:533:3)
at Module.require (internal/modules/cjs/loader.js:640:17)
at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
at /packages/markdown-preview-enhanced/out/src/extension.js:11:14)
at /packages/markdown-preview-enhanced/out/src/extension.js:566:3)
at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
at Module.load (internal/modules/cjs/loader.js:602:32)
at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
at Function.Module._load (internal/modules/cjs/loader.js:533:3)
at Module.require (internal/modules/cjs/loader.js:640:17)
at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
at Package.requireMainModule (/usr/lib/atom/src/package.js:776:27)
at Package.activateNow (/usr/lib/atom/src/package.js:214:34)
at activationHookSubscriptions.add.packageManager.onDidTriggerActivationHook (/usr/lib/atom/src/package.js:895:75)
at Function.simpleDispatch (/usr/lib/atom/node_modules/event-kit/dist/emitter.js:64:14)
at Emitter.emit (/usr/lib/atom/node_modules/event-kit/dist/emitter.js:257:28)
at PackageManager.triggerDeferredActivationHooks (/usr/lib/atom/src/package-manager.js:724:34)
at Promise.all.then (/usr/lib/atom/src/package-manager.js:657:12)
```
This task depends upon

Closed by  Nicola Squartini (tensor5)
Saturday, 09 November 2019, 06:54 GMT
Reason for closing:  Fixed
Additional comments about closing:  no-unsafe-eval.patch removed in 1.37.0 2.
Comment by Mikael Blomstrand (chawlindel) - Saturday, 04 May 2019, 16:56 GMT
I'm having the same problem with the teletype package. I solved it easily simply by removing the no-unsafe-eval patch before building it with makepkg.

I don't understand what the purpose of this patch was to begin with, but that's what causing these issues.
Comment by Mikael Blomstrand (chawlindel) - Monday, 16 September 2019, 10:14 GMT
Teletype package works since the no-unsafe-eval patch was removed. I tried installing `markdown-preview-enhanced` and `markdown-scroll-sync`.
I don't get a stack trace, and except for this probably unrelated issue [1] they seem to work fine.

[1] https://github.com/shd101wyy/markdown-preview-enhanced/issues/1137#issuecomment-517975463

Loading...