GoogleCloudPlatform / ios-docs-samples

iOS samples that demonstrate APIs and services of Google Cloud Platform.
Apache License 2.0
329 stars 209 forks source link

Any new pod is not able to install, update, delete, after I integrated google's speech framework in my app #66

Open adarshroy opened 7 years ago

adarshroy commented 7 years ago

I have a demo project, did Pod-init -> success.

added pod 'Alamofire' -> pod install -> success added pod 'googleapis', :path => '.' -> pod install -> success added any other framework, -> pod install -> fails OR did simple pod install/update -> fails Here is the error :


[!] ERROR: Parsing unable to continue due to parsing error:
contained in the file located at /Users/ios/Documents/Projects/DemoProject4/Podfile.lock
PODS:
  - !ProtoCompiler (3.0.2):
    - Protobuf (~> 3.0)
  - !ProtoCompiler-gRPCPlugin (1.0.2):
    - !ProtoCompiler (= 3.0.2)
    - gRPC-ProtoRPC (= 1.0.2)
  - Alamofire (4.5.1)
  - BoringSSL (7.0):
    - BoringSSL/Implementation (= 7.0)
    - BoringSSL/Interface (= 7.0)
  - BoringSSL/Implementation (7.0):
    - BoringSSL/Interface (= 7.0)
  - BoringSSL/Interface (7.0)
  - googleapis (0.0.1):
    - !ProtoCompiler-gRPCPlugin (~> 1.0.0-pre1.1)
    - googleapis/Messages (= 0.0.1)
    - googleapis/Services (= 0.0.1)
  - googleapis/Messages (0.0.1):
    - !ProtoCompiler-gRPCPlugin (~> 1.0.0-pre1.1)
    - Protobuf
  - googleapis/Services (0.0.1):
    - !ProtoCompiler-gRPCPlugin (~> 1.0.0-pre1.1)
    - googleapis/Messages
    - gRPC-ProtoRPC
  - gRPC (1.0.2):
    - gRPC-Core (= 1.0.2)
    - gRPC-RxLibrary (= 1.0.2)
  - gRPC-Core (1.0.2):
    - gRPC-Core/Implementation (= 1.0.2)
    - gRPC-Core/Interface (= 1.0.2)
  - gRPC-Core/Implementation (1.0.2):
    - BoringSSL (~> 7.0)
    - gRPC-Core/Interface (= 1.0.2)
  - gRPC-Core/Interface (1.0.2)
  - gRPC-ProtoRPC (1.0.2):
    - gRPC (= 1.0.2)
    - gRPC-RxLibrary (= 1.0.2)
    - Protobuf (~> 3.0)
  - gRPC-RxLibrary (1.0.2)
  - Protobuf (3.5.0)

DEPENDENCIES:
  - Alamofire
  - googleapis (from `.`)

EXTERNAL SOURCES:
  googleapis:
    :path: .

SPEC CHECKSUMS:
  !ProtoCompiler: cfad9cbe5299a4923b1c3c8f150818c91efd0b6d
  !ProtoCompiler-gRPCPlugin: ee00d28bb35b26e2657f239833b8f2aa66724f96
  Alamofire: 2d95912bf4c34f164fdfc335872e8c312acaea4a
  BoringSSL: 50035b9d9eeff5529587311782fc57c00ebf13ae
  googleapis: daa20dca7a0097c6c3316fdfd888e0ba1b7c8921
  gRPC: dd3a91e0fb770b9fc4f43d1292fb19f2a2e04158
  gRPC-Core: cc4a7613190ff0bc60a0c1e702ef07cd3f868ae6
  gRPC-ProtoRPC: 11533510522a5e9627883a597a796cfe6bef05f3
  gRPC-RxLibrary: 02cc70b76bc0c5bc622ba27595cca2598d9fe528
  Protobuf: 8a9838fba8dae3389230e1b7f8c104aa32389c03

PODFILE CHECKSUM: bba8f9c22e10518c7ea6f79ab0fb8177c097b5f5

COCOAPODS: 1.4.0.beta.2

Then in terminal, I did this: "pod spec lint", and it is showing this:


-> googleapis (0.0.1)
    - ERROR | [iOS] unknown: Encountered an unknown error ([!] /usr/local/bin/git clone https://github.com/GoogleCloudPlatform/ios-docs-samples.git /var/folders/ww/6vrzrmr5719673rcd2dl2h0w0000gn/T/d20171128-3497-1wew1rs --template= --single-branch --depth 1 --branch 0.0.1

Cloning into '/var/folders/ww/6vrzrmr5719673rcd2dl2h0w0000gn/T/d20171128-3497-1wew1rs'...
warning: Could not find remote branch 0.0.1 to clone.
fatal: Remote branch 0.0.1 not found in upstream origin
) during validation.

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 1 error.

This is not happening for any other project, but when only this demo project is pod-installed/updated, the issue comes. Tried all re-installing pods, psych, etc. Please help

Google Speech-to-Text sample: https://github.com/GoogleCloudPlatform/ios-docs-samples/tree/master/speech/Objective-C/Speech-gRPC-Streaming

Demo Project having the issue: https://www.dropbox.com/s/d13g7alb9k7wmou/DemoProj6.zip?dl=0

adarshroy commented 7 years ago

Installing googleapis as done in the sample, in my app. After that not able to install any other pods. This is happening only for this googleapis pod. Therefore mentioned in the issues of the Sample.

adarshroy commented 7 years ago

@timburks Can you help here ?

ajayghodadra commented 7 years ago

@adarshroy Check this issue, https://github.com/grpc/grpc/issues/12172 Three possible workarounds are mentioned, 1: using cocoapods version 1.2.1 2: manually run a script to add "" around !protocompiler in Podfile.lock and manfest.lock.( Which is the cause of the parser error)

  1. Point cocoapods-core to SHA
adarshroy commented 7 years ago

Thanks @ajayghodadra
Following hack of point 2 of adding "" is doing the work for the time being.

But a proper solution is needed for future, or the Cocoapods should give a support or something like that.

timburks commented 6 years ago

@adarshroy Sorry, I don't have much experience with Cocoapods. But I downloaded your demo project and got the same error that you did when I ran "pod install". But then I deleted Podfile.lock and the Pods directory and reran "pod install", which then seemed to complete successfully. I believe that both Podfile.lock and Pods are artifacts generated by "pod install", so deleting them is safe.

adarshroy commented 6 years ago

@timburks Thanks for looking

As far as I have seen, for the first error (parsing error):

And for the second error ("-> googleapis (0.0.1)", "Could not find remote branch 0.0.1 to clone"):

I feel, an updated sample should be provided in Google's Speech-to-Text framework for "Swift" which should run smoothly without any BUILDFIXES, or pod errors. And a step by step installation and usage guidelines in docs.

flocbit commented 6 years ago

What I ended up doing is each time I update my dependencies I delete Podfile.lock and Pods/Manifest.lock. The downside to this is that Cocoapods has to redownload all dependencies afterwards. So a clean implementation of Cocoapods would be much appreciated ;)

derpoliuk commented 6 years ago

I'll add my 2 cents here:

Podfile.lock file is important because it contains versions of installed pods.

If you keep all your pods updated it is not an issue to delete Podfile.lock run pod install. But if you do have number of pods that are not using latest version (like I have), you might end up with fixing your project to work with all updated pods. And it does not sound like a great idea to do, I'd rather update each pod one by one.