~anteater/mms-stack-bugs#16: 
thread 'main' panicked at 'expected 1 modem, got 2', src/state.rs:195:19

I have AT&T, and I am using the Mobian OS on the PinePhone. I was able to build ofono, mmsd, and vgmms successfully with the following commands:

#dependencies
sudo apt install make gcc automake libtool-bin autotools-dev libudev-dev libdbus-1-dev libglib2.0-dev libcairo2-dev libjpeg-dev libgif-dev libpango1.0-dev libgdk-pixbuf2.0-dev librust-atk-dev librust-gdk-dev libsqlite3-dev

#install rust
curl https://sh.rustup.rs -sSf | sh

#clone the repos
cd ~
mkdir mms
cd mms
git clone https://git.sr.ht/~anteater/vgmms
git clone https://git.sr.ht/~anteater/mmsd
git clone https://git.sr.ht/~anteater/ofono
git clone https://github.com/bryanperris/ell.git

#build ofono (requires the ell repo to be in the parent dir)
cd ofono
./bootstrap-configure && make && sudo make install

#build mmsd (most recent commit might not work)
cd mmsd
git checkout f4b8b32477a411180be1823fdc460b4f7e1e3c9c
./bootstrap-configure && make && sudo make install

#build vgmms (only use 1 CPU core to avoid locking up)
cd ..
cd vgmms
cargo build -j 1 --release

#to run vgmms, start the daemons, then run the executable
sudo service ofono start
/usr/libexec/mmsd
~/mms/vgmms/target/release/vgmms

However, when I ran vgmms I got the following error:

mobian@mobian:~$ RUST_BACKTRACE=1 ~/mms/vgmms/target/release/vgmms
thread 'main' panicked at 'expected 1 modem, got 2', src/state.rs:195:19
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1069
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1504
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:511
  11: rust_begin_unwind
             at src/libstd/panicking.rs:419
  12: std::panicking::begin_panic_fmt
             at src/libstd/panicking.rs:373
  13: vgmms::state::<impl core::default::Default for vgmms::types::VgmmsState>::default
  14: <std::sync::rwlock::RwLock<T> as core::default::Default>::default
  15: vgtk::component::PartialComponentTask<C,P>::new
  16: vgtk::start
  17: vgmms::main
  18: std::rt::lang_start::{{closure}}
  19: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:52
  20: std::panicking::try::do_call
             at src/libstd/panicking.rs:331
  21: std::panicking::try
             at src/libstd/panicking.rs:274
  22: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  23: std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  24: main
  25: __libc_start_main
  26: <unknown>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Status
REPORTED
Submitter
~johanvandegriff
Assigned to
No-one
Submitted
27 days ago
Updated
27 days ago
Labels
No labels applied.

~johanvandegriff 27 days ago

After adding this hack

                        [m] => m.to_owned(),
                        [m1,m2] => m1.to_owned(), //added this line
                        ms => panic!("expected 1 modem, got {}", ms.len()),

I am getting a new error:

mobian@mobian:~/mms/vgmms$ RUST_BACKTRACE=1 ~/mms/vgmms/target/release/vgmms 
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: D-Bus error: Method "GetProperties" with signature "" on interface "org.ofono.SimManager" doesn't exist
 (org.freedesktop.DBus.Error.UnknownMethod)', src/state.rs:198:25
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1069
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1504
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:511
  11: rust_begin_unwind
             at src/libstd/panicking.rs:419
  12: core::panicking::panic_fmt
             at src/libcore/panicking.rs:111
  13: core::option::expect_none_failed
             at src/libcore/option.rs:1268
  14: vgmms::state::<impl core::default::Default for vgmms::types::VgmmsState>::default
  15: <std::sync::rwlock::RwLock<T> as core::default::Default>::default
  16: vgtk::component::PartialComponentTask<C,P>::new
  17: vgtk::start
  18: vgmms::main
  19: std::rt::lang_start::{{closure}}
  20: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:52
  21: std::panicking::try::do_call
             at src/libstd/panicking.rs:331
  22: std::panicking::try
             at src/libstd/panicking.rs:274
  23: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  24: std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  25: main
  26: __libc_start_main
  27: <unknown>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Register here or Log in to comment, or comment via email.