Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Can't Compile on IOS 13.2 #81

Closed
trey-rosius opened this issue Nov 8, 2019 · 5 comments
Closed

Can't Compile on IOS 13.2 #81

trey-rosius opened this issue Nov 8, 2019 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@trey-rosius
Copy link

Hi,
Thanks for this great library.Everything works well on Android.
But i can't compile on IOS.

I'm uisng
flutter_ffmpeg: ^0.2.8
And my iOs version is set to >9.3.

Automatically signing iOS for device deployment using specified development team in Xcode project: VZJM8XY3MC
Running pod install...
CocoaPods' output:

[!] Invalid `Podfile` file: no implicit conversion of Hash into String.

 #  from /Users/rosius/AndroidStudioProjects/test_video_compress/ios/Podfile:66
 #  -------------------------------------------
 #      plugin_pods.each do |name, path|
 >        symlink = File.join('.symlinks', 'plugins', name)
 #        File.symlink(path, symlink)
 #  -------------------------------------------

/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:301:in `rescue in block in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:295:in `block in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:50:in `instance_eval'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:50:in `initialize'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:293:in `new'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:293:in `from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.8.4/lib/cocoapods-core/podfile.rb:259:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/config.rb:200:in `podfile'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:150:in `verify_podfile_exists!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:46:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

Finished with error: Error running pod install

@tanersener tanersener self-assigned this Nov 8, 2019
@tanersener tanersener added the question Further information is requested label Nov 8, 2019
@tanersener
Copy link
Owner

tanersener commented Nov 8, 2019

@trey-rosius Did you fix your issue, do you want me to look at it?

@trey-rosius
Copy link
Author

Hi @tanersener . Thanks a ton for the concern. I fixed the above issue. But now, i have another issue.
When i run the code on an ios 13.2 emulator, it compresses properly. But when running the code on a physical device, iphone 7 with ios 13.2. I get the following error.

2019-11-09 07:14:48.848783+0100 Runner[4406:1074866] Metal API Validation Enabled
2019-11-09 07:14:49.383897+0100 Runner[4406:1075080] flutter: Observatory listening on http://127.0.0.1:50541/h0UkrRjx7GI=/
2019-11-09 07:15:01.987062+0100 Runner[4406:1075062] [core] "Error returned from daemon: Error Domain=com.apple.accounts Code=7 "(null)""
2019-11-09 07:15:02.127166+0100 Runner[4406:1075055] TX and TY are 0. Rotation: 90. Natural width,height: 640.000000, 360.000000
2019-11-09 07:15:02.127286+0100 Runner[4406:1075055] Setting transform tx
2019-11-09 07:15:02.523346+0100 Runner[4406:1075071] flutter: Loading flutter-ffmpeg.
2019-11-09 07:15:02.541086+0100 Runner[4406:1074866] Loaded mobile-ffmpeg-full-gpl-arm64-4.2.2-lts-20190702
2019-11-09 07:15:02.607457+0100 Runner[4406:1074866] Running FFmpeg with arguments: (
"-i",
"/private/var/mobile/Containers/Data/PluginKitPlugin/FBC68043-FB57-46F0-9234-9E4A551FFB55/tmp/trim.66A83DE6-90D6-49E8-82A9-F15DA00FE27D.MOV",
"-c:v",
mpeg4,
"/var/mobile/Containers/Data/Application/753461AA-935C-43DF-8A97-B2286F47A8D3/Documents/temp.mp4"
).
2019-11-09 07:15:02.635016+0100 Runner[4406:1075062] FFmpeg exited with rc: 1
2019-11-09 07:15:02.640952+0100 Runner[4406:1074866] Getting media information for /var/mobile/Containers/Data/Application/753461AA-935C-43DF-8A97-B2286F47A8D3/Documents/temp.mp4 with timeout 10000.
2019-11-09 07:15:02.657913+0100 Runner[4406:1075071] flutter: Loaded flutter-ffmpeg-ios-arm64.
2019-11-09 07:15:02.662177+0100 Runner[4406:1075062] /var/mobile/Containers/Data/Application/753461AA-935C-43DF-8A97-B2286F47A8D3/Documents/temp.mp4: No such file or directory
2019-11-09 07:15:02.668034+0100 Runner[4406:1075071] flutter: ffmpeg version v4.2-dev-1824
2019-11-09 07:15:02.668922+0100 Runner[4406:1075071] flutter: Copyright (c) 2000-2019 the FFmpeg developers
2019-11-09 07:15:02.669715+0100 Runner[4406:1075071] flutter:
2019-11-09 07:15:02.670129+0100 Runner[4406:1075071] flutter: built with Apple LLVM version 7.3.0 (clang-703.0.31)
2019-11-09 07:15:02.722802+0100 Runner[4406:1075071] flutter: configuration: --sysroot=/Applications/Xcode-v7.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk --prefix=/Users/taner/Projects/mobile-ffmpeg/prebuilt/ios-arm64-apple-darwin/ffmpeg --enable-version3 --arch=aarch64 --cpu=armv8 --target-os=darwin --ar=/Applications/Xcode-v7.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang++ --as='/Users/taner/Projects/mobile-ffmpeg/.tmp/gas-preprocessor.pl -arch aarch64 -- clang -arch arm64 -target aarch64-ios-darwin -march=armv8-a+crc+crypto -mcpu=generic -DMOBILE_FFMPEG_ARM64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -fembed-bitcode -DIOS -DMOBILE_FFMPEG_LTS -DMOBILE_FFMPEG_BUILD_DATE=20190702 -isysroot /Applications/Xcode-v7.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -Oz -miphoneos-version-min=9.3 -I/Applications/Xcode-v7.3.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include' --ranlib=/Applications/Xcode-v7.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode-v7.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --enable-neon --enable-cross-compile --enable-pic --enable-asm --enable-inline-asm --enable-optimizations --enable-swscale --enable-static --disable-shared --enable-small --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-indev=v4l2 --disable-indev=fbdev --disable-openssl --disable-xmm-clobber-test --disable-debug --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libx264 --enable-gpl --enable-libxvid --enable-gpl --enable-libx265 --enable-gpl --enable-libvidstab --enable-gpl --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-zlib --enable-audiotoolbox --enable-coreimage --enable-bzlib --enable-videotoolbox --enable-avfoundation
2019-11-09 07:15:02.743841+0100 Runner[4406:1075071] flutter: libavutil 56. 30.100 / 56. 30.100
2019-11-09 07:15:02.744849+0100 Runner[4406:1075071] flutter: libavcodec 58. 53.101 / 58. 53.101
2019-11-09 07:15:02.746164+0100 Runner[4406:1075071] flutter: libavformat 58. 28.101 / 58. 28.101
2019-11-09 07:15:02.747695+0100 Runner[4406:1075071] flutter: libavdevice 58. 7.100 / 58. 7.100
2019-11-09 07:15:02.749505+0100 Runner[4406:1075071] flutter: libavfilter 7. 55.100 / 7. 55.100
2019-11-09 07:15:02.750419+0100 Runner[4406:1075071] flutter: libswscale 5. 4.101 / 5. 4.101
2019-11-09 07:15:02.751534+0100 Runner[4406:1075071] flutter: libswresample 3. 4.100 / 3. 4.100
2019-11-09 07:15:02.752753+0100 Runner[4406:1075071] flutter: FFmpeg process exited with rc 1
2019-11-09 07:15:02.753472+0100 Runner[4406:1075071] flutter: /private/var/mobile/Containers/Data/PluginKitPlugin/FBC68043-FB57-46F0-9234-9E4A551FFB55/tmp/trim.66A83DE6-90D6-49E8-82A9-F15DA00FE27D.MOV: Operation not permitted
2019-11-09 07:15:02.761034+0100 Runner[4406:1075071] flutter: {}

I created a test app to reproduce this. Here's a link to the app
https://github.com/trey-rosius/testVideoCompress.

Note: It works well on an emulator, but returns rc code of 1 on a physical device and says Operation not allowed.

@tanersener
Copy link
Owner

It looks like your input path /private/var/mobile/Containers/Data/PluginKitPlugin/FBC68043-FB57-46F0-9234-9E4A551FFB55/tmp/trim.66A83DE6-90D6-49E8-82A9-F15DA00FE27D.MOV is not accessible. Do you have the necessary permissions?

It can be something about the iOS 13. There are similar issues reported on other libraries. I posted some of them below. Can you try solutions posted there?

apache/cordova-plugin-file#346
apache/cordova-plugin-camera#506

@trey-rosius
Copy link
Author

the image_picker is the cause of this problem. It's getting updated by the flutter team now.
Thanks a lot for the concern

@tanersener
Copy link
Owner

No problem, thanks for the update 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants