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

Test with Xcode 8 beta #280

Open
czechboy0 opened this issue Jun 17, 2016 · 28 comments
Open

Test with Xcode 8 beta #280

czechboy0 opened this issue Jun 17, 2016 · 28 comments

Comments

@czechboy0
Copy link
Member

Let's find out how we're doing with the new Xcode.

@thalmicMark
Copy link

Do you have an estimate on when you'll support Xcode 8? I'm trying locally and getting the following error:

Last sync failed with error The operation couldn’t be completed. (BuildaUtils.JSONError error 0.)

@czechboy0
Copy link
Member Author

Hi @thalmicMark, can you please make sure you're using the latest version of Buildasaur? I fixed some issues with JSON parsing in 1.0.1. If it still persists, I'll take a deeper look. Thanks!

@thalmicMark
Copy link

Yeah, I'm on v1.0.1.

@czechboy0
Copy link
Member Author

Ok. I just ran Buildasaur with Xcode Server running Xcode 8 and things worked. Can you tell me your exact setup: Server.app, Xcode versions, maybe even exact steps?

@thalmicMark
Copy link

Buildasaur: 1.0.1
Server: 5.1.53 (16S1137f) (This is Server beta 3)
Xcode: 8.0 beta 4 (8S188o)

I installed Server beta 3, and when selecting the beta version of Xcode 8, Server prompted me to create an Xcode Server user account. Once that account was created, Xcode Server was able to run my bots.

Since I installed Server beta 3, my Buildasaur syncer has been displaying the above error. Are there any more specific logs I can send you from Buildasaur? I'm guessing the Xcode Server API might have changed.

@thalmicMark
Copy link

Found this in the logs:

[INFO]: Sync starting at 2016-08-05 13:51:47 +0000
[ERROR]: Syncing encountered a problem. Error: The operation couldn’t be completed. (BuildaUtils.JSONError error 0.). Context: Fetching Bots
[INFO]: Sync finished with error at 2016-08-05 13:51:48 +0000, took 0.286 seconds.

@thalmicMark
Copy link

I've also got the JSON response from my server that is causing the error (response from https://127.0.0.1:20343/api/bots). Can send to you privately.

@czechboy0
Copy link
Member Author

Yes please, czechboy0 at gmail
On Fri, Aug 5, 2016 at 5:37 PM Mark DiFranco [email protected]
wrote:

I've also got the JSON response from my server that is causing the error
(response from https://127.0.0.1:20343/api/bots). Can send to you
privately.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#280 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACFL6f-cNXWL2-47YY8X6inPugXV4ZVeks5qc1jQgaJpZM4I4XgU
.

@tettoffensive
Copy link

@thalmicMark @czechboy0 I'm getting the same error with Xcode 7.3.1, Buildasar 1.0.2, Server 5.1.5. Is there any solution to this?

Last sync failed with error The operation couldn’t be completed. (BuildaUtils.JSONError error 0.)

@seanlabastille
Copy link

I guess the logging for missing keys could be tweaked a bit. It looks like as of Beta 6 trigger conditions don't contain the onInternalErrors key anymore.

Workaround, patch TriggerConditions.swift:55 to read

self.onInternalErrors = false //try json.boolForKey("onInternalErrors")

@czechboy0
Copy link
Member Author

@flufff42 Could you please PR a fix for that in XcodeServer? https://github.com/czechboy0/XcodeServerSDK/blob/1bdcf1af67007123d25e2e73504935c46084bb08/XcodeServerSDK/Server%20Entities/TriggerConditions.swift#L55

We can just use it if it's there, give false if not, i.e.
self.onInternalErrors = try? json.boolForKey("onInternalErrors") ?? false

@seanlabastille
Copy link

Sounds good, I've opened buildasaurs/XcodeServerSDK#140 in place.

@thalmicMark
Copy link

When can we expect a release with buildasaurs/XcodeServerSDK#140 included? I saw it was just merged.

@czechboy0
Copy link
Member Author

@thalmicMark @flufff42 Here's a release with the fix: https://github.com/czechboy0/XcodeServerSDK/releases/tag/v0.7.1

It's also in master of Buildasaur, just pull from there and run pod install.

@tettoffensive
Copy link

tettoffensive commented Aug 17, 2016

@czechboy0 Is there any change there'll be a new Buildasar.app to download? I'm having a lot off issues building. Every step I get to I end up having to debug and I finally get past it only to run into another issue:

Currently, it's

Installing ReactiveCocoa (4.0.1)
[!] /bin/bash -c
set -e
sed -i '' 's@<ReactiveCocoa/\(.*\)>@"\1"@g' ReactiveCocoa/ReactiveCocoa.h

sed: can't read s@<ReactiveCocoa/\(.*\)>@"\1"@g: No such file or directory

UPDATE: solved that by changing the pod to look at version 4.2.1 in the Podfile

@czechboy0
Copy link
Member Author

@tettoffensive Can you try 1. delete the Pods folder, 2. ensure your cocoapods version is 1.0.1, 3. run pod install again? This exact sequence worked fine for me.

@thalmicMark
Copy link

I'd like an official Buildasaur.app as well, otherwise I'd need to create my own GitHub API keys. If the timeline for an app is too long, we'll go down the custom key road, but I'd like to avoid it.

@tettoffensive
Copy link

@czechboy0 I managed to build by changing the ReactiveCocoa pod version to 4.2.1. I am running cocoapods 1.0.1

Now, I'm running the master version of Buildasaur, but I still get the same error.

Last sync failed with error The operation couldn't be
completed. (BuildaUtils.JSONError 0.)
Syncer is Idle... Waiting for the next sync...
Created bots: 5
All Pull Requests: 5
All Bots: 1

@seanlabastille
Copy link

To get a better idea of which response is causing this error you can set a Swift Error breakpoint in Xcode.
It should look like this:
screen shot 2016-08-18 at 20 46 33

@tettoffensive
Copy link

public class Bot : XcodeServerEntity {

    public let name: String
    public let configuration: BotConfiguration
    public let integrationsCount: Int

    public required init(json: NSDictionary) throws {

        self.name = try json.stringForKey("name") // json error thrown. "name" not found.
(lldb) bt
* thread #1: tid = 0xabfe53, 0x00000001010c4ed0 libswiftCore.dylib`swift_willThrow, queue = 'com.apple.main-thread', stop reason = breakpoint 3.1
    frame #0: 0x00000001010c4ed0 libswiftCore.dylib`swift_willThrow
  * frame #1: 0x0000000100461700 BuildaUtils`NSDictionary.nonOptionalForKey<A> (key="name", self=3 key/value pairs, $error=ErrorType @ 0x00007fff5fbfcb28) throws -> A + 608 at JSON.swift:83
    frame #2: 0x0000000100461e26 BuildaUtils`NSDictionary.stringForKey(key="name", self=3 key/value pairs, $error=ErrorType @ 0x00007fff5fbfcb28) throws -> String + 102 at JSON.swift:108
    frame #3: 0x0000000100461f0b BuildaUtils`@objc NSDictionary.stringForKey(String) throws -> String + 91 at JSON.swift:0
    frame #4: 0x0000000100a4e7d1 XcodeServerSDK`Bot.init(json=3 key/value pairs, $error=ErrorType @ 0x00007fff5fbfce50) throws -> Bot + 129 at Bot.swift:19
    frame #5: 0x0000000100a4e6ab XcodeServerSDK`Bot.__allocating_init($error=ErrorType @ 0x00007fff5fbfce50) throws -> Bot + 75 at Bot.swift:0
    frame #6: 0x0000000100a9ca33 XcodeServerSDK`XcodeServer.(dictBody=3 key/value pairs, $error=ErrorType @ 0x00007fff5fbfce50)(Bot, completion : (response : XcodeServer.CreateBotResponse) -> ()) -> ()).(closure #1).(closure #1) + 67 at XcodeServer+Bot.swift:213
    frame #7: 0x0000000100a9b657 XcodeServerSDK`thunk + 39 at XcodeServer+Bot.swift:0
    frame #8: 0x0000000100a9a131 XcodeServerSDK`partial apply for thunk + 81 at XcodeServer+Bot.swift:0
    frame #9: 0x000000010045a356 BuildaUtils`unthrow<A> (block=0x0000000100a9a0e0 XcodeServerSDK`partial apply forwarder for reabstraction thunk helper from @callee_owned () -> (@owned XcodeServerSDK.Bot, @error @owned Swift.ErrorType) to @callee_owned () -> (@out XcodeServerSDK.Bot, @error @owned Swift.ErrorType) with unmangled suffix ".25" at XcodeServer+Bot.swift) throws -> A) -> (A?, NSError?) + 166 at Extensions.swift:21
    frame #10: 0x0000000100a9c68d XcodeServerSDK`XcodeServer.(response=0x000060800022ece0, body=Some, error=nil, completion=0x0000000100beee60 BuildaKit`partial apply forwarder for static BuildaKit.XcodeServerSyncerUtils.(createBotFromBuildTemplate (Swift.String, syncer : BuildaKit.StandardSyncer, template : BuildaKit.BuildTemplate, project : BuildaKit.Project, branch : Swift.String, scheduleOverride : Swift.Optional<XcodeServerSDK.BotSchedule>, xcodeServer : XcodeServerSDK.XcodeServer, completion : (bot : Swift.Optional<XcodeServerSDK.Bot>, error : Swift.Optional<__ObjC.NSError>) -> ()) -> ()).(closure #1) at XcodeServerSyncerUtils.swift)(Bot, completion : (response : XcodeServer.CreateBotResponse) -> ()) -> ()).(closure #1) + 589 at XcodeServer+Bot.swift:214
    frame #11: 0x0000000100ab1a58 XcodeServerSDK`XcodeServer.(response=0x000060800022ece0, body=Some, error=nil, completion=0x0000000100a99fc0 XcodeServerSDK`partial apply forwarder for XcodeServerSDK.XcodeServer.((createBotNoValidation in _C0122213F3E9259288EB5FBCD97EEB0B) (XcodeServerSDK.Bot, completion : (response : XcodeServerSDK.XcodeServer.CreateBotResponse) -> ()) -> ()).(closure #1) at XcodeServer+Bot.swift, self=0x00006000001421b0) -> ()) -> NSURLSessionTask?).(closure #1) + 1848 at XcodeServer.swift:145
    frame #12: 0x000000010045e6bb BuildaUtils`HTTP.(data=328 bytes, response=0x000060800022ece0, error=nil, completion=0x0000000100ab0ec0 XcodeServerSDK`partial apply forwarder for XcodeServerSDK.XcodeServer.(sendRequestWithMethod (BuildaUtils.HTTP.Method, endpoint : XcodeServerSDK.XcodeServerEndpoints.Endpoint, params : Swift.Optional<Swift.Dictionary<Swift.String, Swift.String>>, query : Swift.Optional<Swift.Dictionary<Swift.String, Swift.String>>, body : Swift.Optional<__ObjC.NSDictionary>, portOverride : Swift.Optional<Swift.Int>, completion : (response : Swift.Optional<__ObjC.NSHTTPURLResponse>, body : Swift.Optional<Swift.AnyObject>, error : Swift.Optional<__ObjC.NSError>) -> ()) -> Swift.Optional<__ObjC.NSURLSessionTask>).(closure #1) at XcodeServer.swift) -> ()) -> NSURLSessionTask).(closure #1) + 2507 at HTTPUtils.swift:63
    frame #13: 0x000000010045f007 BuildaUtils`thunk + 103 at HTTPUtils.swift:0
    frame #14: 0x00007fff9a8217f1 CFNetwork`__75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 21
    frame #15: 0x00007fff9a8210bf CFNetwork`__49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 302
    frame #16: 0x00007fff8d1bd7d7 Foundation`__NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
    frame #17: 0x00007fff8d1bd495 Foundation`-[NSBlockOperation main] + 100
    frame #18: 0x00007fff8d1bbb7a Foundation`-[__NSOperationInternal _start:] + 654
    frame #19: 0x00007fff8d1b7b64 Foundation`__NSOQSchedule_f + 194
    frame #20: 0x0000000101413cc5 libdispatch.dylib`_dispatch_client_callout + 8
    frame #21: 0x000000010142b6ae libdispatch.dylib`_dispatch_main_queue_callback_4CF + 2845
    frame #22: 0x00007fff8fa189e9 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    frame #23: 0x00007fff8f9d78dd CoreFoundation`__CFRunLoopRun + 1949
    frame #24: 0x00007fff8f9d6ed8 CoreFoundation`CFRunLoopRunSpecific + 296
    frame #25: 0x00007fff9af97935 HIToolbox`RunCurrentEventLoopInMode + 235
    frame #26: 0x00007fff9af9776f HIToolbox`ReceiveNextEventCommon + 432
    frame #27: 0x00007fff9af975af HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71
    frame #28: 0x00007fff869c1efa AppKit`_DPSNextEvent + 1067
    frame #29: 0x00007fff869c132a AppKit`-[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
    frame #30: 0x00007fff869b5e84 AppKit`-[NSApplication run] + 682
    frame #31: 0x00007fff8697f46c AppKit`NSApplicationMain + 1176
    frame #32: 0x00000001000c0964 Buildasaur`main + 84 at AppDelegate.swift:25
    frame #33: 0x00007fff8d1625ad libdyld.dylib`start + 1

@czechboy0
Copy link
Member Author

@tettoffensive whoa, that looks like Bots don't have a name anymore? Which Xcode is this?

@tettoffensive
Copy link

@czechboy0 7.3.1 (7D1014) It shows up in xcode/browser as having the name "Channels Beta Bot"

@thalmicMark
Copy link

You can check the raw JSON here https://127.0.0.1:20343/api/bots.

@tettoffensive
Copy link

tettoffensive commented Aug 18, 2016

@thalmicMark @czechboy0 so it turns out the call is returning 400. weird because i get a valid json response in the browser.

@tettoffensive
Copy link

tried changing my xcode server to "Bots can be created and viewed by: all users" on "all networks", but still a 400 :(

@tettoffensive
Copy link

tettoffensive commented Aug 19, 2016

i did a little debugging:

 private func createBotNoValidation(botOrder: Bot, completion: (response: CreateBotResponse) -> ()) {

        let body: NSDictionary = botOrder.dictionarify()
        let data: NSData?
        do {
            data = try NSJSONSerialization.dataWithJSONObject(body, options: NSJSONWritingOptions(rawValue: 0))
        } catch _ {
            data = nil
        }
        if (data != nil) {
            print(NSString(data: data!, encoding: NSUTF8StringEncoding))
        }

used the json output and put that into Paw. and found that the schemeName wasn't properly set. I'm pretty sure I set it, but I went back and reset it up and this time it seems to be working.

@kdawgwilk
Copy link

Tried setting up Buildasaur fresh with Xcode 8 and got stuck on the page to create a new Build Template. I just get the endless spinner in the top left. I looked briefly in the code and it seems to be stuck waiting for a response from the XcodeServer API or the response was invalid. I tried pulling the project to build it myself to see if I could debug things a little more but I already updated to macOS Sierra and can't run Xcode 7 anymore (without some hacks). I tried getting the project building with Xcode 8 and Swift 2.3 but quite a few deps needed to be updated. I am willing to help migrate and get things running in Xcode 8 but it will be a lengthy process. I also am getting this in the logs:

[VERBOSE]: Selected /Users/xcodeserver/Desktop/repo-dir/Project.xcworkspace
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)
[VERBOSE]: Finished blueprint validation with success!
[VERBOSE]: Selected 
[ERROR]: This git service is not yet supported.
[ERROR]: Please create an issue on GitHub if you want it added (https://github.com/czechboy0/Buildasaur/issues/new)

Not sure why though cause it is a GitHub URL

@seanlabastille
Copy link

@kdawgwilk You may want to create a new issue for this and detail your exact setup. Xcode 8 has been out for a little while now and you seem to be the first to report this particular issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants