Reactivecocoa: I cannot run playground

Created on 24 Jan 2017  ·  14Comments  ·  Source: ReactiveCocoa/ReactiveCocoa

I already build result,reactiveSwift and reactiveCocoa,and i open the ReactiveCocoa-ios.playground, but it still "run Sanbox" then "objc[15129]: pthread_rwlock_wrlock failed (11)"

bug

Most helpful comment

Make sure you open the playground within the workspace. Please also note that master requires Swift 3.1 and Xcode 8.3. If you are using Xcode 8.0 to 8.2, you should checkout the 1.1.3 release instead.

All 14 comments

I did a fresh checkout and tried out the steps for the playground. I got stuck at the step:

Build ReactiveSwift-iOS scheme

This scheme seems to be geared towards a MacOS target and not an iOS one.

@alper That can happen if you run checkout step while the workspace is already open in Xcode. Can you try closing Xcode and reopening it?

  • I deleted everything.
  • Did a new checkout.
  • Closed the playground and the workspace.
  • Did the git submodule init
  • Opened the workspace and started building, but ReactiveSwift-iOS still targets My Mac.

I'm following the instructions from the playground.

I tried again from scratch and got the same result.

scheme

You may need this git submodule update --init --recursive. The missing --recursive option is important and that should be documentation bug.

Ok. Now I'm further along, but now it can't find the built libraries.

(Also the playground is empty.)

Playground execution failed: error: Sandbox.xcplaygroundpage:9:8: error: no such module 'Result'
import Result
       ^

error: Sandbox.xcplaygroundpage:10:8: error: no such module 'ReactiveCocoa'
import ReactiveCocoa
       ^

error: Sandbox.xcplaygroundpage:11:8: error: no such module 'ReactiveSwift'
import ReactiveSwift
       ^

Are you sure that you open (select) the playground within the workspace? Otherwise playground files can't find frameworks. That is a limitation or requirement of Xcode itself.

Yes, I am. It still can't find them.

Guys, I unfortunately trapped into this problem although I taked the steps as the guide in the playground。 Here is the log :

Playground execution failed: error: Sandbox.xcplaygroundpage:11:8: error: no such module 'ReactiveCocoa'
import ReactiveCocoa
^

  • thread #1: tid = 0x271a6, 0x00000001005853c0 Sandbox`executePlayground, queue = 'com.apple.main-thread', stop reason = breakpoint 1.2

    • frame #0: 0x00000001005853c0 SandboxexecutePlayground frame #1: 0x00000001005849c0 Sandbox__37-[XCPAppDelegate enqueueRunLoopBlock]_block_invoke + 32

      frame #2: 0x00000001010a06ac CoreFoundation__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12 frame #3: 0x00000001010856f4 CoreFoundation__CFRunLoopDoBlocks + 356

      frame #4: 0x0000000101084e65 CoreFoundation__CFRunLoopRun + 901 frame #5: 0x0000000101084884 CoreFoundationCFRunLoopRunSpecific + 420

      frame #6: 0x00000001065b3a6f GraphicsServicesGSEventRunModal + 161 frame #7: 0x00000001032e3c68 UIKitUIApplicationMain + 159

      frame #8: 0x00000001005846e9 Sandboxmain + 201 frame #9: 0x0000000102df868d libdyld.dylibstart + 1

I have a same trouble,How can I solve it?Below is error log

Playground execution failed: error: Sandbox.xcplaygroundpage:10:8: error: no such module 'ReactiveSwift'
import ReactiveSwift
^

  • thread #1: tid = 0x2708eb, 0x0000000101cf3360 com.apple.dt.Xcode.PlaygroundStub-macosxexecutePlayground, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 <ul> <li>frame #0: 0x0000000101cf3360 com.apple.dt.Xcode.PlaygroundStub-macosx<code>md5-bcf8ee690e4dc3d14167e46ea871ff6a</code>-[PlaygroundViewBridgeService execute] + 90<br /> frame #2: 0x00007fffb9638c3c CoreFoundation<code>md5-d3498934d1aef66e17f9e11133b87bec</code>-[NSInvocation invoke] + 289<br /> frame #4: 0x00007fffb9652246 CoreFoundation<code>md5-86b8a6a83fafa7fa6f3a20eb848baee4</code>__68-[NSVB_ViewServiceImplicitAnimationDecodingProxy forwardInvocation:]_block_invoke + 47<br /> frame #6: 0x00007fffccf47119 ViewBridge<code>md5-20742ff03a8c7a36586e6bd0c57a29e4</code>+[NSAnimationContext runAnimationGroup:] + 58<br /> frame #8: 0x00007fffb714dfba AppKit<code>md5-57893037e41fa1e1760f7e0051579e04</code>runAnimationGroup + 303<br /> frame #10: 0x00007fffccf28009 ViewBridge<code>md5-da9a6a03d18077708b8a8de8d2e81c42</code>-[NSVB_ViewServiceImplicitAnimationDecodingProxy forwardInvocation:] + 156<br /> frame #12: 0x00007fffb96375fa CoreFoundation<code>md5-61a0c3d73801b8b29b606cd1b2478bcb</code>__forwarding_prep_0___ + 120<br /> frame #14: 0x00007fffb9638c3c CoreFoundation<code>md5-79f75fa73cb3a9ad20e885f2ef020825</code>-[NSInvocation invoke] + 289<br /> frame #16: 0x00007fffb9652246 CoreFoundation<code>md5-7191f46851ffc3e47b5380669f2557f0</code>-[NSVB_QueueingProxy forwardInvocation:] + 327<br /> frame #18: 0x00007fffb96375fa CoreFoundation<code>md5-b38c24384db6e181ffcc86190007e2f5</code>__forwarding_prep_0___ + 120<br /> frame #20: 0x00007fffb9638c3c CoreFoundation<code>md5-524075e4ff5a7dadee251db38e94345d</code>-[NSInvocation invoke] + 289<br /> frame #22: 0x00007fffb9652246 CoreFoundation<code>md5-b491750ce16aa2de99b09091a86bda65</code>___forwarding___ + 538<br /> frame #24: 0x00007fffb9637358 CoreFoundation<code>md5-b4d940ffe939ef455645a4744cb39609</code>__invoking___ + 140<br /> frame #26: 0x00007fffb9638ac1 CoreFoundation<code>md5-10a2a9dc4b06c322926bad365cd2aaf8</code>-[NSInvocation invokeWithTarget:] + 54<br /> frame #28: 0x00007fffb96375fa CoreFoundation<code>md5-2c74d7a6d777ddd753d60f557d7cc0ea</code>__forwarding_prep_0___ + 120<br /> frame #30: 0x00007fffb9638c3c CoreFoundation<code>md5-0128b0b506ea852dba6d68a2e117dc91</code>-[NSInvocation invoke] + 289<br /> frame #32: 0x00007fffccf4b6a9 ViewBridge<code>md5-355f3f1d3605e33ea7c5bfaf80e076b5</code>__deferNSXPCInvocationOntoMainThread_block_invoke_2 + 233<br /> frame #34: 0x00007fffccecf779 ViewBridge<code>md5-8d59c7154aacc8ce4df6af72b118f595</code>__deferNSXPCInvocationOntoMainThread_block_invoke + 179<br /> frame #36: 0x00007fffccf4ae97 ViewBridge<code>md5-23badf7958a5dfe8b69cec3fceb70bff</code>__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12<br /> frame #38: 0x00007fffb963c034 CoreFoundation<code>md5-021608e68b3b989fd8887b8706b33552</code>__CFRunLoopRun + 1878<br /> frame #40: 0x00007fffb963b1c4 CoreFoundation<code>md5-b93a60eec866ffc65eef1f2be16a5c75</code>RunCurrentEventLoopInMode + 240<br /> frame #42: 0x00007fffb8b9ccf1 HIToolbox<code>md5-1e51080bf101bac2bec0e3b254fde409</code>_BlockUntilNextEventMatchingListInModeWithFilter + 71<br /> frame #44: 0x00007fffb7137e24 AppKit<code>md5-a7914285273683cb361c79f5c61f59ae</code>-[NSApplication(NSEvent) _nextEventMatching<a href="EventMask:untilDate">EventMask:untilDate</a>:<a href="inMode:dequeue">inMode:dequeue</a>:] + 2796<br /> frame #46: 0x00007fffcced0948 ViewBridge<code>md5-2568a3a7dede48c6995e8404c0235725</code>-[NSApplication run] + 926<br /> frame #48: 0x00007fffb70f71de AppKit<code>md5-284bf3b54a73e8f1c1db9db05b38d471</code>_xpc_objc_main + 775<br /> frame #50: 0x00007fffceff62e4 libxpc.dylib<code>md5-bcb425aa3f8d11f515422ef632fd7523</code>-[NSXPCSharedListener resume] + 16<br /> frame #52: 0x00007fffcced5636 ViewBridge<code>md5-c88818870eba34d1d3588c1e6072893f</code>main + 34<br /> frame #54: 0x00007fffced9e235 libdyld.dylibstart + 1

Did you perform steps as described in an important comment on top of the playground?

I clone https://github.com/ReactiveCocoa/ReactiveSwift.git Project, and perform setps as below。Result-Mac build success, but ReactiveSwift-macOS build fail. When I open ReactiveSwift.playground file, throw top error.

Retrieve the project dependencies using one of the following terminal commands from the ReactiveSwift project root directory:
git submodule update --init OR, if you have Carthage installed
carthage checkout --no-use-binaries

Open ReactiveSwift.xcworkspace
Build Result-Mac scheme
Build ReactiveSwift-macOS scheme
Finally open the ReactiveSwift.playground
Choose View > Show Debug Area

Make sure you open the playground within the workspace. Please also note that master requires Swift 3.1 and Xcode 8.3. If you are using Xcode 8.0 to 8.2, you should checkout the 1.1.3 release instead.

I checkout the 1.1.3 release, It`s ok, thanks.

Was this page helpful?
0 / 5 - 0 ratings