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

Not showing the correct simulator list after upgrading to Xcode 15 #238

Open
2 tasks done
sainttttt opened this issue Nov 4, 2023 · 7 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@sainttttt
Copy link
Contributor

Editor/Client you used

Neovim

Installation and Dependences checklist

  • xbase is installed and ~/.local/share/xbase has required binaries
  • All listed editor/client dependences is installed

Description

I upgraded my Xcode from Xcode 14 to Xcode 15 and it doesn't seem to be giving the correct simulator list anymore. It only shows iPhone 14, and not iPhone 15, which I believe is the only simulator I have installed now.

Expected behavior

Expect for the correct list of simulators to show up

Reproduce

1. Install Xcode 15 with iOS 17 + iPhone 15 Simulator
2. Try and run through xbase

Actual behavior

The error I get is `Failed to run target/scheme: Unable to lookup in current state Shutdown`

Operating system and version

13.6.1

xbase version / branch / rev

head

Neovim version

0.9.1

Vscode version (if the editor you used is vscode)

No response

Installed XCode Developer Tools

Developer:

    Developer Tools:

      Version: 15.0.1 (15A507)
      Location: /Applications/Xcode.app
      Applications:
          Xcode: 15.0.1 (22266)
          Instruments: 15.0.1 (64561.170)
      SDKs:
          DriverKit:
              23.0: 
          iOS:
              17.0: (21A326)
          iOS Simulator:
              17.0: (21A326)
          macOS:
              14.0: (23A334)
          tvOS:
              17.0: (21J351)
          tvOS Simulator:
              17.0: (21J351)
          watchOS:
              10.0: (21R354)
          watchOS Simulator:
              10.0: (21R354)

XBase Logs

�[32m INFO�[0m �[1mRuntime�[0m�[1m{�[0m�[3mname�[0m�[2m=�[0m"Katherine"�[1m}�[0m�[2m:�[0m [Initializing] ------------------------
�[32m INFO�[0m �[1mBroadcaster�[0m�[1m{�[0m�[3mname�[0m�[2m=�[0m"Katherine"�[1m}�[0m�[2m:�[0m Created
�[32m INFO�[0m �[1mRuntime�[0m�[1m{�[0m�[3mname�[0m�[2m=�[0m"Katherine"�[1m}�[0m�[2m:�[0m targets: {"katherine": TargetInfo { platform: "iOS", configurations: ["Debug", "Release"] }}
�[32m INFO�[0m �[1mBroadcaster�[0m�[1m{�[0m�[3mname�[0m�[2m=�[0m"Katherine"�[1m}�[0m�[2m:�[0m Connected [90704]
�[32m INFO�[0m �[1mRuntime�[0m�[1m{�[0m�[3mname�[0m�[2m=�[0m"katherine"�[1m}�[0m�[2m:�[0m Connected [90704]
�[32m INFO�[0m �[1mRuntime�[0m�[1m{�[0m�[3mname�[0m�[2m=�[0m"katherine"�[1m}�[0m�[2m:�[0m [Initialized] -------------------------
�[32m INFO�[0m �[1mFSWatcher�[0m�[1m{�[0m�[3mname�[0m�[2m=�[0m"katherine"�[1m}�[0m�[2m:�[0m Watching
�[32m INFO�[0m �[1mFSWatcher�[0m�[1m{�[0m�[3mname�[0m�[2m=�[0m"katherine"�[1m}�[0m�[2m:�[0m Running katherine
�[31mERROR�[0m �[1mFSWatcher�[0m�[1m{�[0m�[3mname�[0m�[2m=�[0m"katherine"�[1m}�[0m�[2m:�[0m [katherine] failed to start runner Failed to run target/scheme: Unable to lookup in current state Shutdown
�[32m INFO�[0m �[1mFSWatcher�[0m�[1m{�[0m�[3mname�[0m�[2m=�[0m"katherine"�[1m}�[0m�[2m:�[0m Ran katherine

XBase Build Server Logs

�[34mDEBUG�[0m �[1mxbase_sourcekit_helper�[0m�[2m:�[0m [ContentView.swift] Querying compile_db
�[32m INFO�[0m �[1mxbase_sourcekit_helper�[0m�[2m:�[0m 
�[32m INFO�[0m �[1mxbase_sourcekit_helper�[0m�[2m:�[0m Started
�[32m INFO�[0m �[1mxbase_sourcekit_helper�[0m�[2m:�[0m Initialized
�[34mDEBUG�[0m �[1mxbase_sourcekit_helper�[0m�[2m:�[0m [ContentView.swift] Querying compile_db
�[32m INFO�[0m �[1mxbase_sourcekit_helper�[0m�[2m:�[0m 
�[32m INFO�[0m �[1mxbase_sourcekit_helper�[0m�[2m:�[0m Started
�[32m INFO�[0m �[1mxbase_sourcekit_helper�[0m�[2m:�[0m Initialized
�[34mDEBUG�[0m �[1mxbase_sourcekit_helper�[0m�[2m:�[0m [ContentView.swift] Querying compile_db
�[32m INFO�[0m �[1mxbase_sourcekit_helper�[0m�[2m:�[0m 
@sainttttt sainttttt added the bug Something isn't working label Nov 4, 2023
@sainttttt
Copy link
Contributor Author

Not totally sure but I feel like there could be an issue with https://github.com/xbase-lab/simctl. When I try to run the tests I get this:


running 19 tests
test list::tests::test_list ... ok
test get_app_container::tests::test_get_app_container ... FAILED
test install::tests::test_install ... FAILED
test launch::tests::test_launch ... FAILED
test io::tests::test_screenshot ... FAILED
test privacy::tests::test_privacy_grant ... FAILED
test keychain::tests::test_keychain_reset ... FAILED
test privacy::tests::test_privacy_reset_all ... FAILED
test getenv::tests::test_getenv ... FAILED
test boot::tests::test_boot ... FAILED
test privacy::tests::test_privacy_reset ... FAILED
test open_url::tests::test_open_url ... FAILED
test privacy::tests::test_privacy_revoke ... FAILED
test push::tests::test_push ... FAILED
test shutdown::tests::test_shutdown ... FAILED
test status_bar::tests::test_status_bar ... FAILED
test terminate::tests::test_terminate ... FAILED
test ui::tests::test_appearance ... FAILED
test uninstall::tests::test_uninstall ... FAILED

failures:

---- get_app_container::tests::test_get_app_container stdout ----
thread 'get_app_container::tests::test_get_app_container' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- install::tests::test_install stdout ----
thread 'install::tests::test_install' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- launch::tests::test_launch stdout ----
thread 'launch::tests::test_launch' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- io::tests::test_screenshot stdout ----
thread 'io::tests::test_screenshot' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- privacy::tests::test_privacy_grant stdout ----
thread 'privacy::tests::test_privacy_grant' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- keychain::tests::test_keychain_reset stdout ----
thread 'keychain::tests::test_keychain_reset' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- privacy::tests::test_privacy_reset_all stdout ----
thread 'privacy::tests::test_privacy_reset_all' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- getenv::tests::test_getenv stdout ----
thread 'getenv::tests::test_getenv' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- boot::tests::test_boot stdout ----
thread 'boot::tests::test_boot' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- privacy::tests::test_privacy_reset stdout ----
thread 'privacy::tests::test_privacy_reset' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- open_url::tests::test_open_url stdout ----
thread 'open_url::tests::test_open_url' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- privacy::tests::test_privacy_revoke stdout ----
thread 'privacy::tests::test_privacy_revoke' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- push::tests::test_push stdout ----
thread 'push::tests::test_push' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- shutdown::tests::test_shutdown stdout ----
thread 'shutdown::tests::test_shutdown' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- status_bar::tests::test_status_bar stdout ----
thread 'status_bar::tests::test_status_bar' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- terminate::tests::test_terminate stdout ----
thread 'terminate::tests::test_terminate' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- ui::tests::test_appearance stdout ----
thread 'ui::tests::test_appearance' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10

---- uninstall::tests::test_uninstall stdout ----
thread 'uninstall::tests::test_uninstall' panicked at 'called `Option::unwrap()` on a `None` value', src/mock.rs:11:10


failures:
    boot::tests::test_boot
    get_app_container::tests::test_get_app_container
    getenv::tests::test_getenv
    install::tests::test_install
    io::tests::test_screenshot
    keychain::tests::test_keychain_reset
    launch::tests::test_launch
    open_url::tests::test_open_url
    privacy::tests::test_privacy_grant
    privacy::tests::test_privacy_reset
    privacy::tests::test_privacy_reset_all
    privacy::tests::test_privacy_revoke
    push::tests::test_push
    shutdown::tests::test_shutdown
    status_bar::tests::test_status_bar
    terminate::tests::test_terminate
    ui::tests::test_appearance
    uninstall::tests::test_uninstall

test result: FAILED. 1 passed; 18 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.37s

@kkharji
Copy link
Owner

kkharji commented Nov 6, 2023

Not totally sure but I feel like there could be an issue with https://github.com/xbase-lab/simctl. When I try to run the tests I get this:

@sainttttt hmm either due to hard code device id or lib broke with recent version of xcode

@sainttttt
Copy link
Contributor Author

@kkharji I haven't hardcoded any device ids, so I think it's an issue with lib and xcode possibly. Do you think you can fix it? Sort of breaking my workflow right now. Thanks!

@sainttttt
Copy link
Contributor Author

@kkharji So I downgraded back to XCode 14 and now while it builds I keep getting this error

Failed to run target/scheme: Unable to lookup in current state Shutdown

Even though the simulator is open and can run (and can run with xcode). Any idea as to what is going on?

@sainttttt
Copy link
Contributor Author

@kkharji So turns out that I got it to work again with xcode 14 at least. For some reason my lazy.nvim was set to pull from xbase-lab/xbase - not sure if that was causing the issue or not. However I'm pretty sure the same issue with xcode 15 happens so it would be cool if that could be fixed before we are forced to upgrade

@duggthangs
Copy link

duggthangs commented Dec 16, 2023

@sainttttt Are you still having this issue? I am running it alongside XCode 15.1 with Run/Watch/Build working with iPhone 15

@duggthangs
Copy link

duggthangs commented Dec 16, 2023

@sainttttt Maybe this might make a difference, but try specifying the opts.simctl.iOS as I have here:

{
'xbase-lab/xbase',
dependencies = {
	'neovim/nvim-lspconfig',
},
build = "make install",
config = function()
	require 'xbase'.setup {
		log_level = vim.log.levels.DEBUG,
		simctl = {
			iOS = {
				"iPhone 15 Pro"
			}
		},
		mappings = {
			build_picker = 0,
			run_picker = 0,
			watch_picker = 0,
			all_picker = 0,
			toggle_split_log_buffer = 0,
			toggle_vsplit_log_buffer = 0
		}
	}


end
},

and I have sourcekit-lsp called with xcrun to use XCode's symlink.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants