MeetYouDevs / cocoapods-imy-bin

1.05k stars 245 forks source link

测试Demo 组件spec push失败 #89

Closed y2kbug closed 3 years ago

y2kbug commented 3 years ago

pod bin auto --all-make /Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/Demo.xcodeproj /Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/Demo /Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/BinArchive.json /Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/.DS_Store /Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/Podfile_local /Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/Demo_test.podspec ====== cocoapods-imy-bin 0.3.1.3 版本 ========

====== dev 环境 ========

====== dev 环境 ======== [pod gen] Running with pod gen configuration { podfile_path: /Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/Podfile, podfile: Podfile, use_podfile: true, use_podfile_plugins: true, podfile_plugins: {"cocoapods-imy-bin"=>{}}, lockfile: #, use_lockfile: true, use_lockfile_versions: true, use_libraries: false, generate_multiple_pod_projects: false, incremental_installation: false, gen_directory: /Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo-build-temp/bin-archive, auto_open: false, clean: true, podspec_paths: [#<Pathname:/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/Demo_test.podspec>, #<Pathname:/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/Demo_test.podspec>], podspecs: [#, #], sources: ["git@github.com:su350380433/example_spec_bin_dev.git", "git@github.com:su350380433/example_spec_source.git", "git@github.com:su350380433/example_spec_bin_dev.git", "git@github.com:su350380433/example_spec_source.git", "https://cdn.cocoapods.org"], local_sources: [], repo_update: false, use_default_plugins: false, deterministic_uuids: false, share_schemes_for_development_pods: true, warn_for_multiple_pod_sources: false, use_modular_headers: false }

Generating Demo in ../Demo-build-temp/bin-archive/Demo Cleaning gen install directory Creating stub application Writing Podfile

Installing... Fetching podspec for YYCache from https://github.com/ibireme/YYCache/raw/master/YYCache.podspec /Users/xiong/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/external_sources/podspec_source.rb:19: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open Fetching podspec for YYModel from https://github.com/ibireme/YYModel/raw/master/YYModel.podspec /Users/xiong/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/external_sources/podspec_source.rb:19: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open Installing Demo (1) Installing FMDB (2.7.5) Installing LKDBHelper (2.5.3) Installing YYCache (1.0.4) Installing YYModel (1.0.4)

[!] Please close any current Xcode sessions and use Demo.xcworkspace for this project from now on. Pod installation complete! There are 5 dependencies from the Podfile and 5 total pods installed.

Performing post-installation steps Open ../Demo-build-temp/bin-archive/Demo/Demo.xcworkspace to work on Demo

Building static framework Demo (1) command = xcodebuild GCC_PREPROCESSOR_DEFINITIONS='$(inherited)' ARCHS='arm64' OTHER_CFLAGS='-fembed-bitcode -Qunused-arguments' CONFIGURATION_BUILD_DIR=/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo-build-temp/bin-archive/Demo/build-arm64 clean build -configuration Debug -target Demo -project ./Pods/Pods.xcodeproj 2>&1 command = xcodebuild GCC_PREPROCESSOR_DEFINITIONS='$(inherited)' ARCHS='armv7' OTHER_CFLAGS='-fembed-bitcode -Qunused-arguments' CONFIGURATION_BUILD_DIR=/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo-build-temp/bin-archive/Demo/build-armv7 clean build -configuration Debug -target Demo -project ./Pods/Pods.xcodeproj 2>&1 Building simulator libraries command = xcodebuild GCC_PREPROCESSOR_DEFINITIONS='$(inherited)' -sdk iphonesimulator ARCHS='x86_64' CONFIGURATION_BUILD_DIR=/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo-build-temp/bin-archive/Demo/build-x86_64 clean build -configuration Debug -target Demo -project ./Pods/Pods.xcodeproj 2>&1

Updating Spec Repositories

更新私有源仓库 su350380433-1 更新私有源仓库 su350380433

[!] ====== cocoapods-imy-bin 0.3.1.3 版本 ========

[!] ====== dev 环境 ========

[!] ====== archive-white-pod-list = ["Demo", "YYCache"]

[!] ====== ignore_git_list = ["git@gitlab.xxx.com:Github-iOS"]

[!] Your project does not explicitly specify the CocoaPods master specs repo. Since CDN is now used as the default, you may safely remove it from your repos directory via pod repo remove master. To suppress this warning please add warn_for_unused_master_specs_repo => false to your Podfile.

[!] 【Demo | 1】组件spec push失败 .

Demo_test.podspec文件

# MARK: converted automatically by spec.py. @hgy
Pod::Spec.new do |s|
    s.name = 'Demo'
    s.version = '1'
    s.description = '我只是一个测试的,主要是想要 s.dependency'
    s.license = 'MIT'
    s.summary = 'Seeyou'
    s.homepage = 'https://github.com/meiyoudev/IMYPublic'
    s.authors = { 'suliangjin' => 'suliangjin@xiaoyouzi.com' }
    s.source = { :git => 'git@github.com:su350380433/cocaopods-imy-bin.git', :branch => 'dev' }
        s.requires_arc = true
        s.ios.deployment_target = '9.0'
        s.source_files = 'Source/**/*.{h,m,c}'
        s.public_header_files = 'Source/**/*.h'

        s.dependency 'YYModel'
        s.dependency 'YYCache'
        s.dependency 'FMDB'
        s.dependency 'LKDBHelper'
end

Podfile文件

source 'https://github.com/cocoapods/specs.git'

#命令写在这里也是等效, 已移动到Podfile_local中,避免git提交冲突等场景
#plugin 'cocoapods-imy-bin'
#use_binaries!

target 'Demo' do
  use_frameworks!
  pod 'FMDB'
  pod 'LKDBHelper'

  pod 'YYModel',:podspec => 'https://github.com/ibireme/YYModel/raw/master/YYModel.podspec'

  pod 'YYCache',:podspec => 'https://github.com/ibireme/YYCache/raw/master/YYCache.podspec'

  end

Podfile_local文件

plugin 'cocoapods-imy-bin'
use_binaries!

#需要替换Podfile里面的组件才写到这里
target 'Demo' do

pod 'YYModel', :path => '../YYModel'

end
dabing1022 commented 3 years ago

====== archive-white-pod-list = ["Demo", "YYCache"]

[!] 【Demo | 1】组件spec push失败 .目前这个信息可以忽略,master最新代码已经修复,但还尚未发布tag。原因在于Demo工程已经处于白名单,并不会被编译后上传。这个信息会有一定的困惑。

dabing1022 commented 3 years ago

具体可以观察Demo-build-temp文件目录的bin-zip部分,以及查看frameworks url

y2kbug commented 3 years ago

Demo-build-temp 目录bin-zip 为空的,正常会有zip文件,再上传到静态资源服务器

y2kbug commented 3 years ago

Demo-build-temp 中build-archive 的project 编译运行正常,应该是启用的二进制的

dabing1022 commented 3 years ago
sources: ["git@github.com:su350380433/example_spec_bin_dev.git", "git@github.com:su350380433/example_spec_source.git", "git@github.com:su350380433/example_spec_bin_dev.git", "git@github.com:su350380433/example_spec_source.git", "https://cdn.cocoapods.org"]

建议按照文档来,pod bin init使用自己的源码源和二进制源,这几个源是作者的仓库,你不能直接git push操作。另外关于Node的服务可以检查下。

y2kbug commented 3 years ago
sources: ["git@github.com:su350380433/example_spec_bin_dev.git", "git@github.com:su350380433/example_spec_source.git", "git@github.com:su350380433/example_spec_bin_dev.git", "git@github.com:su350380433/example_spec_source.git", "https://cdn.cocoapods.org"]

建议按照文档来,pod bin init使用自己的源码源和二进制源,这几个源是作者的仓库,你不能直接git push操作。另外关于Node的服务可以检查下。

push二进制podspec和上传zip文件流程有先后顺序吗,bin-zip目录为空,是push二进制podspec环节失败导致生成zip上传都没有操作吗,我从node服务上没有看到有post请求记录。

dabing1022 commented 3 years ago
sources: ["git@github.com:su350380433/example_spec_bin_dev.git", "git@github.com:su350380433/example_spec_source.git", "git@github.com:su350380433/example_spec_bin_dev.git", "git@github.com:su350380433/example_spec_source.git", "https://cdn.cocoapods.org"]

建议按照文档来,pod bin init使用自己的源码源和二进制源,这几个源是作者的仓库,你不能直接git push操作。另外关于Node的服务可以检查下。

push二进制podspec和上传zip文件流程有先后顺序吗,bin-zip目录为空,是push二进制podspec环节失败导致生成zip上传都没有操作吗,我从node服务上没有看到有post请求记录。

先上传二进制文件,后上传二进制podspec。目前来看应该archive失败了。

排查思路:

  1. 可以先看看build-arm64/armv7/x86_64这些文件夹中是否存在静态库。
  2. 检查下Node服务中,查看frameworks的url,看看结果是啥?可以贴出来,看看是不是之前运行过已经打过二进制
y2kbug commented 3 years ago

1、从默认白名单中移除了YYCache,确是有部分Spec push失败是白名单显示错误 2、bin-zip archive正常了有YYCache zip文件了,build-arm64/armv7/x86_64存在静态库 3、确认是zip上传到node静态资源服务失败,没有framework url路由记录

pod bin auto --all-make 执行结果如下

/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/Demo.xcodeproj
/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/Demo
/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/BinArchive.json
/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/.DS_Store
/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/Podfile_local
/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/Demo_test.podspec
====== cocoapods-imy-bin 0.3.1.3 版本 ========

======  dev 环境 ========

======  dev 环境 ========
[pod gen] Running with `pod gen` configuration {
  podfile_path: /Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/Podfile,
  podfile: Podfile,
  use_podfile: true,
  use_podfile_plugins: true,
  podfile_plugins: {"cocoapods-imy-bin"=>{}},
  lockfile: #<Pod::Lockfile>,
  use_lockfile: true,
  use_lockfile_versions: true,
  use_libraries: true,
  generate_multiple_pod_projects: false,
  incremental_installation: false,
  gen_directory: /Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo-build-temp/bin-archive,
  auto_open: false,
  clean: true,
  podspec_paths: [#<Pathname:/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/Demo_test.podspec>, #<Pathname:/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo/Demo_test.podspec>],
  podspecs: [#<Pod::Specification name="Demo">, #<Pod::Specification name="Demo">],
  sources: ["git@github.com:su350380433/example_spec_bin_dev.git", "git@github.com:su350380433/example_spec_source.git", "git@github.com:su350380433/example_spec_bin_dev.git", "git@github.com:su350380433/example_spec_source.git", "https://cdn.cocoapods.org"],
  local_sources: [],
  repo_update: false,
  use_default_plugins: false,
  deterministic_uuids: false,
  share_schemes_for_development_pods: true,
  warn_for_multiple_pod_sources: false,
  use_modular_headers: false }

Generating Demo in `../Demo-build-temp/bin-archive/Demo`
    Cleaning gen install directory
    Creating stub application
    Writing Podfile

Installing...
Fetching podspec for `YYCache` from `https://github.com/ibireme/YYCache/raw/master/YYCache.podspec`
/Users/xiong/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/external_sources/podspec_source.rb:19: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
Fetching podspec for `YYModel` from `https://github.com/ibireme/YYModel/raw/master/YYModel.podspec`
/Users/xiong/.rvm/rubies/ruby-2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/external_sources/podspec_source.rb:19: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
Installing FMDB (2.7.5)
Installing LKDBHelper (2.5.3)
Installing YYCache (1.0.4)
Installing Demo (1)
Installing YYModel (1.0.4)

[!] Please close any current Xcode sessions and use `Demo.xcworkspace` for this project from now on.
Pod installation complete! There are 5 dependencies from the Podfile and 5 total pods installed.

Performing post-installation steps
    Open `../Demo-build-temp/bin-archive/Demo/Demo.xcworkspace` to work on Demo

Building static framework Demo (1)
  command = xcodebuild GCC_PREPROCESSOR_DEFINITIONS='$(inherited)'  ARCHS='arm64'
  OTHER_CFLAGS='-fembed-bitcode -Qunused-arguments'
  CONFIGURATION_BUILD_DIR=/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo-build-temp/bin-archive/Demo/build-arm64
  clean build -configuration Debug -target Demo -project ./Pods/Pods.xcodeproj 2>&1
  command = xcodebuild GCC_PREPROCESSOR_DEFINITIONS='$(inherited)'  ARCHS='armv7'
  OTHER_CFLAGS='-fembed-bitcode -Qunused-arguments'
  CONFIGURATION_BUILD_DIR=/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo-build-temp/bin-archive/Demo/build-armv7
  clean build -configuration Debug -target Demo -project ./Pods/Pods.xcodeproj 2>&1
  Building simulator libraries
  command = xcodebuild GCC_PREPROCESSOR_DEFINITIONS='$(inherited)'  -sdk iphonesimulator
  ARCHS='x86_64'
  CONFIGURATION_BUILD_DIR=/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/Demo-build-temp/bin-archive/Demo/build-x86_64
  clean build -configuration Debug -target Demo -project ./Pods/Pods.xcodeproj 2>&1

Building static framework YYCache (1.0.4)

Building static Library YYCache (1.0.4)
  Building ios libraries with archs ["arm64", "armv7"]
  lipo -create -output ios/YYCache.framework/Versions/A/YYCache build-arm64/libYYCache.a
  build-armv7/libYYCache.a build-x86_64/libYYCache.a
  Copying license

Building static library YYCache (1.0.4)
Compressing bin_YYCache_1.0.4 into bin_YYCache_1.0.4.zip
          上传二进制文件
         curl http://localhost:8080/frameworks -F "name=YYCache" -F "version=1.0.4" -F "annotate=YYCache_1.0.4_log" -F "file=@bin-zip/bin_YYCache_1.0.4.zip"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  818k    0     0  100  818k      0   5511  0:02:32  0:02:32 --:--:--     0
curl: (52) Empty reply from server

Validating spec
 -> YYCache (1.0.4)
    - WARN  | [iOS] vendored_libraries: `*.a` does not match the expected static library name format `lib[name].a`

The repo `su350380433-1` at `../../../.cocoapods/repos/su350380433-1` is not clean

Updating Spec Repositories

更新私有源仓库 su350380433-1
更新私有源仓库 su350380433

[!] ====== cocoapods-imy-bin 0.3.1.3 版本 ========

[!] ======  dev 环境 ========

[!] ====== archive-white-pod-list = ["Demo"]

[!] ====== ignore_git_list = ["git@gitlab.xxx.com:Github-iOS"]

[!] Your project does not explicitly specify the CocoaPods master specs repo. Since CDN is now used as the default, you may safely remove it from your repos directory via `pod repo remove master`. To suppress this warning please add `warn_for_unused_master_specs_repo => false` to your Podfile.

[!] 【Demo | 1】组件spec push失败 .

[!] 【YYCache | 1.0.4】组件spec push失败 .

Node.js服务记录如下

> binary-server@0.1.0 start /Users/xiong/Downloads/cocoapods-imy-bin-demo-master/binary-server
> node app.js

(node:5979) UnhandledPromiseRejectionWarning: MongooseServerSelectionError: connection <monitor> to 198.18.1.11:27017 timed out
    at NativeConnection.Connection.openUri (/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/binary-server/node_modules/mongoose/lib/connection.js:832:32)
    at /Users/xiong/Downloads/cocoapods-imy-bin-demo-master/binary-server/node_modules/mongoose/lib/index.js:345:10
    at /Users/xiong/Downloads/cocoapods-imy-bin-demo-master/binary-server/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
    at new Promise (<anonymous>)
    at promiseOrCallback (/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/binary-server/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10)
    at Mongoose._promiseOrCallback (/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/binary-server/node_modules/mongoose/lib/index.js:1135:10)
    at Mongoose.connect (/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/binary-server/node_modules/mongoose/lib/index.js:344:20)
    at Object.<anonymous> (/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/binary-server/app.js:8:10)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47
(Use `node --trace-warnings ...` to show where the warning was created)
(node:5979) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:5979) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  <-- GET /frameworks/
  --> GET /frameworks/ 200 25ms 2b
  <-- GET /favicon.ico
  --> GET /favicon.ico 404 1ms -

node服务只有get请求记录没有post请求记录

y2kbug commented 3 years ago

====== archive-white-pod-list = ["Demo", "YYCache"]

[!] 【Demo | 1】组件spec push失败 .目前这个信息可以忽略,master最新代码已经修复,但还尚未发布tag。原因在于Demo工程已经处于白名单,并不会被编译后上传。这个信息会有一定的困惑。

gem 没有找到可以直接安装git commit 插件,只能通过安装指定版本号方式,目前没有安装master分支修复

dabing1022 commented 3 years ago
          上传二进制文件
         curl http://localhost:8080/frameworks -F "name=YYCache" -F "version=1.0.4" -F "annotate=YYCache_1.0.4_log" -F "file=@bin-zip/bin_YYCache_1.0.4.zip"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  818k    0     0  100  818k      0   5511  0:02:32  0:02:32 --:--:--     0
curl: (52) Empty reply from server

先看下这个日志。

y2kbug commented 3 years ago
          上传二进制文件
         curl http://localhost:8080/frameworks -F "name=YYCache" -F "version=1.0.4" -F "annotate=YYCache_1.0.4_log" -F "file=@bin-zip/bin_YYCache_1.0.4.zip"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  818k    0     0  100  818k      0   5511  0:02:32  0:02:32 --:--:--     0
curl: (52) Empty reply from server

先看下这个日志。

  • 在 Demo-build-temp 目录下,手动执行 curl http://localhost:8080/frameworks -F "name=YYCache" -F "version=1.0.4" -F "annotate=YYCache_1.0.4_log" -F "file=@bin-zip/bin_YYCache_1.0.4.zip" 看下终端结果。
  • http://localhost:8080/frameworks 目前输出啥?
  • curl: (52) Empty reply from server 具体原因还需要排查下 如果bin-zip下面有zip文件
  1. 在 Demo-build-temp 目录下,手动执行 curl http://localhost:8080/frameworks -F "name=YYCache" -F "version=1.0.4" -F "annotate=YYCache_1.0.4_log" -F "file=@bin-zip/bin_YYCache_1.0.4.zip" 终端直接超时curl: (52) Empty reply from server
  2. http://localhost:8080/frameworks 前端报错Internal Server Error
  3. bin-zip下有zip文件 image

node 服务日志

MongooseError: Operation `components.find()` buffering timed out after 10000ms
      at Timeout.<anonymous> (/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/binary-server/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:184:20)
      at listOnTimeout (internal/timers.js:554:17)
      at processTimers (internal/timers.js:497:7)

  xxx GET /frameworks/ 500 10s -

应该是node 的mongoose.model('Component') 的Component.find awatit超时ctx.body没有返回导致的

dabing1022 commented 3 years ago

看来本地服务有问题。mongo和node重启下呢

y2kbug commented 3 years ago
          上传二进制文件
         curl http://localhost:8080/frameworks -F "name=YYCache" -F "version=1.0.4" -F "annotate=YYCache_1.0.4_log" -F "file=@bin-zip/bin_YYCache_1.0.4.zip"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  818k    0     0  100  818k      0   5511  0:02:32  0:02:32 --:--:--     0
curl: (52) Empty reply from server

先看下这个日志。

  • 在 Demo-build-temp 目录下,手动执行 curl http://localhost:8080/frameworks -F "name=YYCache" -F "version=1.0.4" -F "annotate=YYCache_1.0.4_log" -F "file=@bin-zip/bin_YYCache_1.0.4.zip" 看下终端结果。
  • http://localhost:8080/frameworks 目前输出啥?
  • curl: (52) Empty reply from server 具体原因还需要排查下 如果bin-zip下面有zip文件
  1. 在 Demo-build-temp 目录下,手动执行 curl http://localhost:8080/frameworks -F "name=YYCache" -F "version=1.0.4" -F "annotate=YYCache_1.0.4_log" -F "file=@bin-zip/bin_YYCache_1.0.4.zip" 终端直接超时curl: (52) Empty reply from server
  2. http://localhost:8080/frameworks 前端报错Internal Server Error
  3. bin-zip下有zip文件 image

node 服务日志

MongooseError: Operation `components.find()` buffering timed out after 10000ms
      at Timeout.<anonymous> (/Users/xiong/Downloads/cocoapods-imy-bin-demo-master/binary-server/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:184:20)
      at listOnTimeout (internal/timers.js:554:17)
      at processTimers (internal/timers.js:497:7)

  xxx GET /frameworks/ 500 10s -

应该是node 的mongoose.model('Component') 的Component.find awatit超时ctx.body没有返回导致的

查了下moogoose.mode find对应就是db的query的操作,这里面

看来本地服务有问题。mongo和node重启下呢

node服务启动正常,mongodb 是通过Homebrew安装社区版本,作为常驻服务启动的 image

dabing1022 commented 3 years ago

目前我是这么启动mongo的,sudo mongod --dbpath=/Users/XXXX/data/db node的话,在/cocoapods-imy-bin-demo/binary-servernpm start

y2kbug commented 3 years ago

目前我是这么启动mongo的,sudo mongod --dbpath=/Users/XXXX/data/db node的话,在/cocoapods-imy-bin-demo/binary-servernpm start

  1. node服务启动和你的方式一致
  2. MongoDb 是通过Homebrew安装社区版本 默认启用的路径是在配置文件/usr/local/etc/mongod.conf的数据库目录/usr/local/var/mongodb和启动时指定路径效果一致,测试在Mongo shell环境下创建table插入数据正常

目前通过修改app.js中 connect语句,访问localhost:8080/frameworks正常页面输出{},node日志没有出现db的find超时警告了 node 日志记录如下

> binary-server@0.1.0 start /Users/xiong/Downloads/cocoapods-imy-bin-demo-master/binary-server
> node app.js

mongodb数据库连接成功
  <-- GET /frameworks/
  --> GET /frameworks/ 200 63ms 2b
  <-- GET /favicon.ico
  --> GET /favicon.ico 404 1ms -

pod bin auto 中yycache上传zip依然出错

Building static library YYCache (1.0.4)
Compressing bin_YYCache_1.0.4 into bin_YYCache_1.0.4.zip
          上传二进制文件
         curl http://localhost:8080/frameworks -F "name=YYCache" -F "version=1.0.4" -F "annotate=YYCache_1.0.4_log" -F "file=@bin-zip/bin_YYCache_1.0.4.zip"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  818k    0     0  100  818k      0   5528  0:02:31  0:02:31 --:--:--     0
curl: (52) Empty reply from server

Validating spec
 -> YYCache (1.0.4)
    - WARN  | [iOS] vendored_libraries: `*.a` does not match the expected static library name format `lib[name].a`

The repo `su350380433-1` at `../../../.cocoapods/repos/su350380433-1` is not clean

Updating Spec Repositories

更新私有源仓库 su350380433-1
更新私有源仓库 su350380433

[!] ====== cocoapods-imy-bin 0.3.1.3 版本 ======== 

[!] ======  dev 环境 ======== 

[!] ====== archive-white-pod-list = ["Demo"]

[!] ====== ignore_git_list = ["git@gitlab.xxx.com:Github-iOS"]

[!] Your project does not explicitly specify the CocoaPods master specs repo. Since CDN is now used as the default, you may safely remove it from your repos directory via `pod repo remove master`. To suppress this warning please add `warn_for_unused_master_specs_repo => false` to your Podfile.

[!] 【Demo | 1】组件spec push失败 .

[!] 【YYCache | 1.0.4】组件spec push失败 .

从目前node服务日志和DB操作看 node 和DB服务都正常

dabing1022 commented 3 years ago

可以再查查资料关于curl: (52) Empty reply from server的原因。

y2kbug commented 3 years ago

使用curl手动上传zip问题已解决 1、curl: (52) Empty reply from server是挂了surge代理开启了增强模式,curl走了代理,修复后 2、修复后遇到Failed to open/read local data from file/application,原因是curl不能使用相对路径,改成绝对路径解决

在push spec和上传zip环节中,能否去掉自动上传zip只push spec,不然从我的情况看通过 curl自动上传肯定失败,不确定这个 curl 上传只能指定绝对路径问题是我的curl工具问题还是用法问题

dabing1022 commented 3 years ago

使用curl手动上传zip问题解决 1、curl: (52) Empty reply from server是挂了surge代理开启了增强模式,curl走了代理,修复后 2、修复后遇到Failed to open/read local data from file/application,原因是curl不能使用相对路径,改成绝对路径解决

那现在pod bin auto --all-make应该正常了吧。

y2kbug commented 3 years ago

使用curl手动上传zip问题解决 1、curl: (52) Empty reply from server是挂了surge代理开启了增强模式,curl走了代理,修复后 2、修复后遇到Failed to open/read local data from file/application,原因是curl不能使用相对路径,改成绝对路径解决

那现在pod bin auto --all-make应该正常了吧。

pod bin auto --all-make流程走不下去,目前在curl上传自动环节出错,得手动curl指定文件的绝对路径才能上传

y2kbug commented 3 years ago

使用homebrew升级了默认curl后支持了相对路径