Sentry上传sourceMap报OSError[Errno 13]Permission denied:/data/files

xinjiangyuangit
  • 0
新手上路,请多包涵

问题描述

Sentry部署在Centos 7后上传项目的sourceMap出现OSError [Errno 13] Permission denied: '/data/files/随机名'

项目编译时上传出错

building for production...> Analyzing 187 sources
> Rewriting sources
> Adding source map references
> Bundled 187 files for upload
error: API request failed
  caused by: sentry reported an error: request failure (http status: 500)
  Object({"detail": String("Internal Error"), "errorId": String("50f89106176e4071a02a4c1d78ab1db0")})

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.
Hash: bef36a23d557fccbb823
Version: webpack 3.12.0
Time: 63477ms

Sentry上面的错误记录
image.png

问题出现的环境背景及自己尝试过哪些方法

推测主要原因可能是/data/files/文件的权限问题,但是执行chmod -R 777 /data/files/后依旧没用

相关代码

webpack.base.conf.js

const SentryPlugin = require('@sentry/webpack-plugin');

module.exports = {
    plugins: [
        new SentryPlugin({
            release: 'projectname@0.0.1',
            include: './dist',
            ignore: ['node_modules', 'webpack.config.js'],
        })
    ]
}

main.js

Sentry.init({
  release: 'projectname@0.0.1',
  dsn: 'http://***@000.000.0.0:port/id',
  integrations: [new Integrations.Vue({Vue, attachProps: true})]
});

.sentryclirc

[defaults]
url = http://0.0.0.0:port/
org = sentry
project = projectname

[auth]
token = I am a token
回复
阅读 3.4k
2 个回答
czx2019
  • 2
新手上路,请多包涵

docker volume ls看一下 sentry-data有没有
有的话docker inspect sentry-data 找一下挂载的主机路径
cd进去 chmod 777 .

问题解决了吗?

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏