Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pod install error #1

Closed
sdespont opened this issue May 8, 2016 · 12 comments
Closed

Pod install error #1

sdespont opened this issue May 8, 2016 · 12 comments

Comments

@sdespont
Copy link

sdespont commented May 8, 2016

Hello,

I am trying to install the framework using podfile as explained in the documentation, but I am getting this error :

[!] InvalidPodfilefile: syntax error, unexpected keyword_end, expecting end-of-input.

My podfile is:

use_frameworks!
    pod 'iOSDFULibrary'
end

Any idea?

@mostafaberg
Copy link
Contributor

Can you attach your Podfile here ? sometimes quotes display differently and are actually broken, you need to make sure they're actual single quotes and not the curled ones

@sdespont
Copy link
Author

sdespont commented May 8, 2016

Sure, here is the zipped file :
Podfile.zip

This file has been created with TextWrangler in order to avoid "quotting" problem with TextEdit

@mostafaberg
Copy link
Contributor

Oh, my bad, just noticed a tiny mistake in the documentation, we missed out the target setting, will update the docs tomorrow !

your issue is that you're missing the target 'myApp' do in the beginning, so the Podfile looks like this:

use_frameworks!
target 'MyApp' do
  pod 'iOSDFULibrary'
end

Sorry about that mistake, let me know if this resolves your issue 👍

@sdespont
Copy link
Author

sdespont commented May 8, 2016

Thanks, first time using CocoaPods for me, sorry for the dumb question.

Now, the error is the following :

Analyzing dependencies
[!] Unable to find a specification for `iOSDFULibrary`

Can you help me or give me a hint?

@mostafaberg
Copy link
Contributor

No worries at all, if it can't find a specification for your app that means you probably have a deployment target we don't support, what's your deployment target in XCode ?

@sdespont
Copy link
Author

sdespont commented May 8, 2016

IOS 9.2

How can I know supported deployment targets?

@mostafaberg
Copy link
Contributor

What happens if you try to run this in your terminal ?

pod try iOSDFULibrary

are you able to build and run the example ?

@sdespont
Copy link
Author

sdespont commented May 8, 2016

Another error message :

Trying iOSDFULibrary
Performing CocoaPods Installation

[!] Invalid `Podfile` file: [!] Unsupported options `{:exclusive=>true}` for target `iOSDFULibrary_Example`..

 #  from /private/var/folders/_h/vmjtkgp517q_4vwbmf59fgvc0000gr/T/CocoaPods/Try/iOSDFULibrary/Example/Podfile:3
 #  -------------------------------------------
 #  
 >  target 'iOSDFULibrary_Example', :exclusive => true do
 #    pod 'iOSDFULibrary', :path => '../'
 #  -------------------------------------------

@mostafaberg
Copy link
Contributor

Well that's interesting, I need to get a hold on a Mac to test this out, I haven't seen things go that way before, so I'll have to wait till tomorrow morning before I can be of any help.

@mostafaberg
Copy link
Contributor

I just made it to work and cannot seem to reproduce the issue, here's the output of a newly created project, made that Podfile in the project's root :

use_frameworks!
target 'dfuTesting' do
    pod 'iOSDFULibrary', '~> 0.1'
end

and here's the output of pod install

CocoaPods 1.0.0.rc.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Analyzing dependencies
Downloading dependencies
Installing EVReflection (2.29.0)
Installing Zip (0.3.4)
Installing iOSDFULibrary (0.1.5)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use `dfuTesting.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 3 total pods installed.

Also here's the output of pod try iOSDFULibrary :

Trying iOSDFULibrary
Performing CocoaPods Installation

CocoaPods 1.0.0.rc.2 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Fetching podspec for `iOSDFULibrary` from `../`
Installing EVReflection 2.29.0 (was 2.24.0)
Using Zip (0.3.4)
Installing iOSDFULibrary 0.1.5 (was 0.1.1)
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 3 total pods installed.
Opening '/private/var/folders/7r/nxyqj1lx4k93crsknywzn5880000gn/T/CocoaPods/Try/iOSDFULibrary/Example/iOSDFULibrary.xcworkspace'

Maybe if you try to clear the caches ? try to rm -rf ~/Library/Caches/CocoaPods and see if that helps ?

@sdespont
Copy link
Author

sdespont commented May 9, 2016

Thanks for your tests. Your assumptions was correct, clearing the cache permits to run successfully the command pod install 👍

@mostafaberg
Copy link
Contributor

That's awesome !, Cocoapods can be tricky sometimes 👍 glad to hear it's resolved now, have a great day

mostafaberg pushed a commit that referenced this issue Oct 31, 2016
mostafaberg pushed a commit that referenced this issue Sep 27, 2018
dinesharjani added a commit to dinesharjani/IOS-Pods-DFU-Library that referenced this issue May 27, 2022
The following Stack Trace happens in nRF Connect 2.5.1:
Thread 13 name:
Thread 13 Crashed:
0   nRF-Connect                   	0x0000000100f77410 closure NordicSemiconductor#1 in SecureDFUPeripheral.selectCommandObject() + 384 (SecureDFUPeripheral.swift:0)
1   nRF-Connect                   	0x0000000100f772d8 closure NordicSemiconductor#1 in SecureDFUPeripheral.selectCommandObject() + 72 (SecureDFUPeripheral.swift:187)
2   nRF-Connect                   	0x0000000100f6d500 specialized SecureDFUControlPoint.peripheral(_:didUpdateValueFor:error:) + 1436 (SecureDFUControlPoint.swift:621)
3   nRF-Connect                   	0x0000000100f6bc8c @objc SecureDFUControlPoint.peripheral(_:didUpdateNotificationStateFor:error:) + 108
4   CoreBluetooth                 	0x00000001be97b64c -[CBPeripheral handleAttributeEvent:args:attributeSelector:delegateSelector:delegateFlag:] + 188 (CBPeripheral.m:804)
5   CoreBluetooth                 	0x00000001be97b7f0 -[CBPeripheral handleCharacteristicEvent:characteristicSelector:delegateSelector:delegateFlag:] + 124 (CBPeripheral.m:826)
6   CoreBluetooth                 	0x00000001be977994 -[CBPeripheral handleMsg:args:] + 600 (CBPeripheral.m:233)
7   CoreBluetooth                 	0x00000001be961af0 -[CBCentralManager handleMsg:args:] + 192 (CBCentralManager.m:1451)
8   CoreBluetooth                 	0x00000001be9a22b8 -[CBManager xpcConnectionDidReceiveMsg:args:] + 208 (CBManager.m:428)
9   CoreBluetooth                 	0x00000001be9916c0 __30-[CBXpcConnection _handleMsg:]_block_invoke + 68 (CBXpcConnection.m:370)
10  libdispatch.dylib             	0x000000019fe16e68 _dispatch_call_block_and_release + 32 (init.c:1517)
11  libdispatch.dylib             	0x000000019fe18a2c _dispatch_client_callout + 20 (object.m:560)
12  libdispatch.dylib             	0x000000019fe20124 _dispatch_lane_serial_drain + 668 (inline_internal.h:2622)
13  libdispatch.dylib             	0x000000019fe20cb4 _dispatch_lane_invoke + 444 (queue.c:3944)
14  libdispatch.dylib             	0x000000019fe20000 _dispatch_lane_serial_drain + 376 (inline_internal.h:0)
15  libdispatch.dylib             	0x000000019fe20cb4 _dispatch_lane_invoke + 444 (queue.c:3944)
16  libdispatch.dylib             	0x000000019fe20000 _dispatch_lane_serial_drain + 376 (inline_internal.h:0)
17  libdispatch.dylib             	0x000000019fe20c80 _dispatch_lane_invoke + 392 (queue.c:3944)
18  libdispatch.dylib             	0x000000019fe2b500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
19  libsystem_pthread.dylib       	0x000000021110a0bc _pthread_wqthread + 288 (pthread.c:2599)
20  libsystem_pthread.dylib       	0x0000000211109e5c start_wqthread + 8

Quick analysis shows we're force-unwrapping SecureDFUResponse's maxSize, offset and crc. The obvious fix would be to just guard those properties and if they're not there, to report an Error. But the code-path leading to this code getting executed suggests we might be executing the callback for the wrong type of response, so we're going to sacrifice killing the bug in exchange for perhaps learning new information regarding the root cause of the issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants