I’ve spent the better part of the evening trying to sort this out without any luck. I’ve put the device in DFU, it gets accepted, download finishes, it reboots but never enters recovery mode and I don’t have enough time to put it back into DFU since the application exists after about 8 seconds. Any idea as to how to solve this? Tried with 4 different cables as well so I doubt it’s a hardware issue
Seems that restoring fails for iPad Pro 11.
Something about:
DEBUG: tss_response_get_path_by_entry: No entry ‘iBEC’ in TSS response
ERROR: Device did not disconnect. Possibly invalid iBEC. Reset device and try again.
Full debug log:
erasure_failed.log
Can’t restore iPod touch 2g and iPod touch 4 with idevicerestore --latest
command.
Both are getting the similar errors.
~$ idevicerestore --latest
idevicerestore 1.0.0-128-g7b89019
Found device in DFU mode
ECID: 4135132642701
Identified device as n81ap, iPod4,1
The following firmwares are currently being signed for iPod4,1:
[1] 6.1.6 (build 10B500)
Select the firmware you want to restore: 1
Selected firmware 6.1.6 (build 10B500)
WARNING: Could not lock file 'iPod4,1_6.1.6_10B500_Restore.ipsw.lock'
Verifying 'iPod4,1_6.1.6_10B500_Restore.ipsw'...
Checksum matches.
WARNING: Could not unlock file 'iPod4,1_6.1.6_10B500_Restore.ipsw.lock'
Extracting BuildManifest from IPSW
Product Version: 6.1.6
Product Build: 10B500 Major: 10
Device supports Image4: false
Variant: Customer Upgrade Install (IPSW)
This restore will update the device without erasing user data.
Checking IPSW for required components...
All required components found in IPSW
Using cached filesystem from 'iPod4,1_6.1.6_10B500_Restore/058-2543-001.dmg'
Getting ApNonce in dfu mode...
Trying to fetch new SHSH blob
Getting SepNonce in dfu mode...
ERROR: Unable to find required ApNonce in parameters
ERROR: Unable to add img3 tags to TSS request
ERROR: Unable to get SHSH blobs for this device
Have tried both DFU and recovery modes
I’m using Linux Mint.
idevicerestore and dependencies for it were installed manually directly from their repos in libimobiledevice
I tried downgrading my iPhone X from ios 16.0 to ios 15.5, the command ran without any errors but my phone is now stuck on a black screen with the apple logo (no spinner or progress bar). It’s been like this for a few hours please help
Hi guys, after a few days banging my head against a brick wall, «idevicerestore -l» ends on the infamous «Unable to receive message from FDR 0x55b0cfdc1f10 (-2). 0/2 bytes» error. I modified fdr.c to allow for more retries to open the port and set a longer SLEEP wait but to no avail.
On the other hand, irecovery reports accurately when I am in either RESTORE or DFU mode. I am able to set the iPhone 6 (A1586) to either state and even send commands thru irecovery. When in idevicerestore, the program(s) run without any hicups until I hit the aforementioned error.
Questions:
(1). Is there a way to push the iPhone firmware thru an irecovery command (-s).
(2). Is the latest compile of idevicerestore ok? I am also compiling libplist, libusbmuxd, libimobiledevice, usbmuxd, libirecovery, and of course idevicerestore. All compiles finish ok just with a few warnings about unused variables.
(3), Is there any procedure to run this that I am missing?
Many thanks in advance.
Hi
I’ve managed to wipe my disk completely while playing around on the M1 and now I am trying
to restore the laptop with idevicerestore, however the TSS request fails while doing so.
Debug log is attached.
Found device in Recovery mode
Identified device as j293ap, MacBookPro17,1
The following firmwares are currently being signed for MacBookPro17,1:
[1] 11.4 (build 20F71)
[2] 11.3.1 (build 20E241)
[3] 11.3 (build 20E232)
[4] 11.2.3 (build 20D91)
[5] 11.2.2 (build 20D80)
[6] 11.2.1 (build 20D74)
[7] 11.2 (build 20D64)
[8] 11.1 (build 20C69)
[9] 11.0.1 (build 20B29)
Select the firmware you want to restore: 1
Selected firmware 11.4 (build 20F71)
Verifying 'UniversalMac_11.4_20F71_Restore.ipsw'...
Checksum matches.
Extracting BuildManifest from IPSW
Product Version: 11.4
Product Build: 20F71 Major: 20
INFO: device serial number is FVFFK08DQ05P
Device supports Image4: true
Variant: Customer Erase Install (IPSW)
This restore will erase your device data.
################################ [ WARNING ] #################################
# You are about to perform an *ERASE* restore. ALL DATA on the target device #
# will be IRREVERSIBLY DESTROYED. If you want to update your device without #
# erasing the user data, hit CTRL+C now and restart without -e or --erase #
# command line switch. #
# If you want to continue with the ERASE, please type YES and press ENTER. #
##############################################################################
> YES
Checking IPSW for required components...
All required components found in IPSW
Using cached filesystem from 'UniversalMac_11.4_20F71_Restore/018-17379-086.dmg'
Found ECID 2375052739346462
Getting ApNonce in recovery mode... 12 45 5f 47 c0 43 48 fd 91 9a f6 15 5d 50 02 d6 a5 f2 ca 4d 7f c3 ef a7 6c 37 44 d4 33 19 1a f4
Trying to fetch new SHSH blob
Getting SepNonce in recovery mode... 29 9f 5b ca 14 e1 67 54 ab 28 5f 6e d5 8d 7c 9c a1 ca 82 85
Request URL set to https://gs.apple.com/TSS/controller?action=2
Sending TSS request attempt 1... response successfully received
Received SHSH blobs
Getting SepNonce in recovery mode... 29 9f 5b ca 14 e1 67 54 ab 28 5f 6e d5 8d 7c 9c a1 ca 82 85
Request URL set to https://gs.apple.com/TSS/controller?action=2
Sending TSS request attempt 1... response successfully received
Received SHSH blobs
Getting SepNonce in recovery mode... 29 9f 5b ca 14 e1 67 54 ab 28 5f 6e d5 8d 7c 9c a1 ca 82 85
Request URL set to https://gs.apple.com/TSS/controller?action=2
TSS server returned: STATUS=8&MESSAGE=An internal error occurred.
ERROR: TSS request failed (status=8, message=An internal error occurred.)
Sending TSS request attempt 1... ERROR: Unable to send TSS request
ERROR: Unable to get SHSH blobs for this device (recovery OS Root Ticket)
debug_out.txt
Found device in DFU mode
Identified device as n94ap, iPhone4,1
The following firmwares are currently being signed for iPhone4,1:
[1] 9.3.6 (build 13G37)
[2] 9.3.5 (build 13G36)
Select the firmware you want to restore: 1
Selected firmware 9.3.6 (build 13G37)
Verifying ‘iPhone4,1_9.3.6_13G37_Restore.ipsw’…
Checksum matches.
Extracting BuildManifest from IPSW
Product Version: 9.3.6
Product Build: 13G37 Major: 13
Device supports Image4: false
Variant: Customer Upgrade Install (IPSW)
This restore will update your device without erasing user data.
Checking IPSW for required components…
All required components found in IPSW
Using cached filesystem from ‘iPhone4,1_9.3.6_13G37_Restore/058-48374-040.dmg’
Found ECID 2089276808695
Getting ApNonce in dfu mode… 98 1b 92 af 1f cf 8a 39 2f d5 bb 9c 26 6d a1 9f 10 36 57 6b
Trying to fetch new SHSH blob
Getting SepNonce in dfu mode…
Request URL set to https://gs.apple.com/TSS/controller?action=2
Sending TSS request attempt 1… response successfully received
Received SHSH blobs
Extracting iBSS.n94.RELEASE.dfu…
Personalizing IMG3 component iBSS…
reconstructed size: 80410
Sending iBSS (80410 bytes)…
[==================================================] 100.0%
ERROR: Device did not disconnect. Possibly invalid iBSS. Reset device and try again.
ERROR: Unable to place device into recovery mode from DFU mode
Found device in Recovery mode
Identified device as n94ap, iPhone4,1
The following firmwares are currently being signed for iPhone4,1:
[1] 9.3.6 (build 13G37)
[2] 9.3.5 (build 13G36)
Select the firmware you want to restore: 1
Selected firmware 9.3.6 (build 13G37)
Verifying ‘iPhone4,1_9.3.6_13G37_Restore.ipsw’…
Checksum matches.
Extracting BuildManifest from IPSW
Product Version: 9.3.6
Product Build: 13G37 Major: 13
INFO: device serial number is DX5MVCHQFML6
Device supports Image4: false
Variant: Customer Upgrade Install (IPSW)
This restore will update your device without erasing user data.
Checking IPSW for required components…
All required components found in IPSW
Using cached filesystem from ‘iPhone4,1_9.3.6_13G37_Restore/058-48374-040.dmg’
Found ECID 2089276808695
Getting ApNonce in recovery mode… 80 37 4f 0c 88 91 ea 5d 72 a4 9f e3 56 b4 2c 6e 77 a8 60 ec
Trying to fetch new SHSH blob
Getting SepNonce in recovery mode…
Request URL set to https://gs.apple.com/TSS/controller?action=2
Sending TSS request attempt 1… response successfully received
Received SHSH blobs
Sending APTicket (2732 bytes)
Extracting iBEC.n94.RELEASE.dfu…
Not personalizing component iBEC…
Sending iBEC (278924 bytes)…
Getting ApNonce in recovery mode… 80 37 4f 0c 88 91 ea 5d 72 a4 9f e3 56 b4 2c 6e 77 a8 60 ec
Sending APTicket (2732 bytes)
Recovery Mode Environment:
iBoot build-version=iBoot-2817.60.2
iBoot build-style=RELEASE
Sending RestoreLogo…
Extracting applelogo@2xiphone.s5l8940x.img3…
Not personalizing component RestoreLogo…
Sending RestoreLogo (6796 bytes)…
ramdisk-size=0x4000000
Extracting 058-49412-040.dmg…
Not personalizing component RestoreRamDisk…
Sending RestoreRamDisk (21602572 bytes)…
Extracting DeviceTree.n94ap.img3…
Not personalizing component RestoreDeviceTree…
Sending RestoreDeviceTree (83532 bytes)…
Extracting kernelcache.release.n94…
Not personalizing component RestoreKernelCache…
Sending RestoreKernelCache (10718924 bytes)…
Waiting for device to enter restore mode…
About to restore device…
Connecting now…
Connected to com.apple.mobile.restored, version 13
Device ffffffffffffffffffffffffffffffff00000004 has successfully entered restore mode
Hardware Information:
BoardID: 8
ChipID: 35136
UniqueChipID: 2089276808695
ProductionMode: true
Panic log is available:
panic(cpu 0 caller 0xa0091891): «IOP panic: fmiss_get_next_operation_status: WMR_PANIC: «Timeout» drivers/apple/h2fmi/fmiss_ppn.c:1320 «
Debugger message: panic
OS version: 13G37
Kernel version: Darwin Kernel Version 15.6.0: Fri Aug 19 10:37:54 PDT 2016; root:xnu-3248.61.11/RELEASE_ARM_S5L8940X
Paniclog version: 3
Kernel slide: 0x000000001f000000
Kernel text base: 0x9f001000
Boot : 0x5f30d421 0x00000000
Sleep : 0x00000000 0x00000000
Wake : 0x00000000 0x00000000
Calendar: 0x5f30d42d 0x000116c9
Panicked task 0x8005b440: 8179 pages, 123 threads: pid 0: kernel_task
panicked thread: 0x80180ba0, backtrace: 0x92013e88
0x9f0c9b63
0x9f0c9e39
0x9f020f63
0xa0091891
0xa00909a3
0x9f352031
0x9f046ecb
0x9f0c755c
Task 0x8005b440: 8179 pages, 123 threads: pid 0: kernel_task
Task 0x8005b7a0: 675 pages, 5 threads: pid 1: launchd
Task 0x8005bb00: 146 pages, 1 threads: pid 2: fsck
Task 0x8005be60: 186 pages, 1 threads: pid 3: fsck_hfs
Starting FDR listener thread
ERROR: Unable to connect to FDR client (-2)
ERROR: Failed to start FDR Ctrl channel
ERROR: Unable to start the restore process
ERROR: Unable to restore device
15:09:20.671: LibVersion: 20220922
15:09:20.671: Start flash
15:09:20.671: Checking PC DiskSpace
15:09:20.671: Detecting Connection
15:09:20.674: Found a device with mode: Recovery
15:09:20.674: Detecting ProductType
15:09:20.674: matching device type through original information
15:09:20.675: Checking iDevice firmware C:3uToolsFirmwareiPhone11,8_16.2_20C65_Restore.ipsw
15:09:20.675: Extract BuildManifest.plist
15:09:20.675: Extracting Restore.plist from IPSW
15:09:20.686: Firmware version: 16.2
15:09:20.686: Product Build: 20C65 Major: 20
15:09:20.687: Is Image4 supported: TRUE
15:09:20.687: Extracting Firmware
15:09:20.691: Reading ECID
15:09:20.691: Found ECID 7886874997293102
15:09:20.691: Reading NONCE
15:09:20.691: Requesting SHSH
15:09:21.999: Enter Recovery Mode
15:09:25.570: Sending AppleLogo
15:09:26.796: Sending Ramdisk
15:09:34.990: Sending DeviceTree
15:09:35.009: Sending RestoreSep
15:09:35.214: Sending KernelCache
15:09:43.884: Restoring
15:09:43.884: About to restore device…
15:09:46.424: ERROR: build identity info does not contain a MacOSVariant
15:09:46.464: Sending RootTicket
15:09:46.468: Waiting for NAND
15:09:46.479: Updating NAND Firmware
15:09:54.143: Sending NORData
15:10:06.005: ERROR: Unable to receive message from FDR 10E97BF8 (-4). 0/2 bytes
Please help, I’ve tried with 3utool and iTune
I’ve tested on windows 7 and macos mavericks, same issue
eventually it gives up looking and says device failed to enter restore mode
Is there a distro that includes the packages as listed:
sudo apt-get install
build-essential
pkg-config
checkinstall
git
autoconf
automake
libtool-bin
libreadline-dev
libusb-1.0-0-dev
libplist-dev
libimobiledevice-dev
libimobiledevice-glue-dev
libcurl4-openssl-dev
libssl-dev
libzip-dev
zlib1g-dev
This is missing libimobiledevice-glue-dev
. I have tried on debian latest, ubuntu latest, ubuntu 21, ubuntu 20 and ubuntu 19.
I tried going to each of the individual projects (libimobiledevice-glue-dev
) and make those manually, but they also seem to have missing packages. I built libplist
, libimobiledevice-glue
, then libirecovery
and finally idevicerestore
. When building idevicerestore
I got the following error
configure: error: Package requirements (libimobiledevice-1.0 >= 1.3.0) were not met:
Requested 'libimobiledevice-1.0 >= 1.3.0' but version of libimobiledevice is 1.2.1
Which is odd because I built libimobiledevice from source.
Hi
I’ve been trying to recover a device, iphone 6s (already recover another one just fine) but keep getting this error, does anyone knows what it means?
Found device in Recovery mode
Identified device as n61ap, iPhone7,2
Extracting BuildManifest from IPSW
Product Version: 12.5.6
Product Build: 16H71 Major: 16
INFO: device serial number is F17P2US0G5MC
Device supports Image4: true
Variant: Customer Erase Install (IPSW)
This restore will erase your device data.
################################ [ WARNING ] #################################
# You are about to perform an *ERASE* restore. ALL DATA on the target device #
# will be IRREVERSIBLY DESTROYED. If you want to update your device without #
# erasing the user data, hit CTRL+C now and restart without -e or --erase #
# command line switch. #
# If you want to continue with the ERASE, please type YES and press ENTER. #
##############################################################################
> YES
Checking IPSW for required components...
All required components found in IPSW
Using cached filesystem from '/home/akami/Downloads/iPhone_4.7_12.5.6_16H71_Restore/038-87263-049.dmg'
Found ECID 656219868735526
Getting ApNonce in recovery mode... e2 6b 3e 36 0a 83 f1 57 11 ca 0b 3e 1d 43 6f b7 66 f7 ef 2e
Trying to fetch new SHSH blob
Getting SepNonce in recovery mode... 4c c0 ee 2b 7d 03 4c ee aa 2a 75 6c b5 a1 90 c3 e6 8e 0e 82
Request URL set to https://gs.apple.com/TSS/controller?action=2
Sending TSS request attempt 1... response successfully received
Received SHSH blobs
Extracting iBEC.n61.RELEASE.im4p...
Personalizing IMG4 component iBEC...
Sending iBEC (731534 bytes)...
Recovery Mode Environment:
iBoot build-version=iBoot-4513.270.14
iBoot build-style=RELEASE
Sending RestoreLogo...
Extracting applelogo@2x~iphone.im4p...
Personalizing IMG4 component RestoreLogo...
Sending RestoreLogo (12334 bytes)...
Extracting 038-87170-059.dmg.trustcache...
Personalizing IMG4 component RestoreTrustCache...
Sending RestoreTrustCache (9681 bytes)...
ramdisk-size=0x10000000
Extracting 038-87170-059.dmg...
Personalizing IMG4 component RestoreRamDisk...
Sending RestoreRamDisk (91715275 bytes)...
Extracting DeviceTree.n61ap.im4p...
Personalizing IMG4 component RestoreDeviceTree...
Sending RestoreDeviceTree (125714 bytes)...
Extracting kernelcache.release.iphone7...
Personalizing IMG4 component RestoreKernelCache...
Sending RestoreKernelCache (14069209 bytes)...
Waiting for device to enter restore mode...
About to restore device...
Connecting now...
Connected to com.apple.mobile.restored, version 15
Device f5d74fa2c1fb70260c51bd1c37520fc0f722e1a6 has successfully entered restore mode
Hardware Information:
BoardID: 6
ChipID: 28672
UniqueChipID: 656219868735526
ProductionMode: true
Starting FDR listener thread
About to send RootTicket...
Sending RootTicket now...
Done sending RootTicket
Waiting for NAND (28)
About to send NORData...
Found firmware path Firmware/all_flash
Getting firmware manifest from build identity
Extracting LLB.n61.RELEASE.im4p...
Personalizing IMG4 component LLB...
Extracting applelogo@2x~iphone.im4p...
Personalizing IMG4 component AppleLogo...
Extracting batterycharging0@2x~iphone.im4p...
Personalizing IMG4 component BatteryCharging0...
Extracting batterycharging1@2x~iphone.im4p...
Personalizing IMG4 component BatteryCharging1...
Extracting batteryfull@2x~iphone.im4p...
Personalizing IMG4 component BatteryFull...
Extracting batterylow0@2x~iphone.im4p...
Personalizing IMG4 component BatteryLow0...
Extracting batterylow1@2x~iphone.im4p...
Personalizing IMG4 component BatteryLow1...
Extracting glyphplugin@1334~iphone-lightning.im4p...
Personalizing IMG4 component BatteryPlugin...
Extracting DeviceTree.n61ap.im4p...
Personalizing IMG4 component DeviceTree...
Extracting recoverymode@1334~iphone-lightning.im4p...
Personalizing IMG4 component RecoveryMode...
Extracting iBoot.n61.RELEASE.im4p...
Personalizing IMG4 component iBoot...
Extracting sep-firmware.n61.RELEASE.im4p...
Personalizing IMG4 component RestoreSEP...
Extracting sep-firmware.n61.RELEASE.im4p...
Personalizing IMG4 component SEP...
Sending NORData now...
ERROR: Unable to receive message from FDR 0x559c29cc16c0 (-2). 0/2 bytes
ERROR: Unable to send NORImageData data
ERROR: Unable to send NOR data
ERROR: Unable to successfully restore device
ERROR: Could not read data (-256). Aborting.
ERROR: Unable to restore device
Thanks in advance
irecv_event_cb: device 000e34c920d0e02e (udid: N/A) connected in Recovery mode
opening device 05ac:1281 @ 0xfa130000…
Setting to configuration 1
Setting to interface 0:0
Recovery Mode Environment:
iBoot build-version=iBoot-8419.40.112
iBoot build-style=RELEASE
Sending RestoreLogo…
DEBUG: tss_response_get_path_by_entry: No entry ‘RestoreLogo’ in TSS response
NOTE: No path for component RestoreLogo in TSS, will fetch from build_identity
Extracting applelogo@2xiphone.im4p (Firmware/all_flash/applelogo@2xiphone.im4p)…
Personalizing IMG4 component RestoreLogo…
Tag found
Sending RestoreLogo (13868 bytes)…
DEBUG: AVE is loaded by iBoot.
DEBUG: tss_response_get_path_by_entry: No entry ‘AVE’ in TSS response
NOTE: No path for component AVE in TSS, will fetch from build_identity
Extracting AppleAVE2FW_H10.im4p (Firmware/ave/AppleAVE2FW_H10.im4p)…
Personalizing IMG4 component AVE…
Tag found
Sending AVE (1082486 bytes)…
DEBUG: ISP is loaded by iBoot.
DEBUG: tss_response_get_path_by_entry: No entry ‘ISP’ in TSS response
NOTE: No path for component ISP in TSS, will fetch from build_identity
Extracting adc-nike-d20.im4p (Firmware/isp_bni/adc-nike-d20.im4p)…
Personalizing IMG4 component ISP…
Tag found
Sending ISP (9842086 bytes)…
DEBUG: RestoreTrustCache is loaded by iBoot.
DEBUG: tss_response_get_path_by_entry: No entry ‘RestoreTrustCache’ in TSS response
NOTE: No path for component RestoreTrustCache in TSS, will fetch from build_identity
Extracting 078-64668-116.dmg.trustcache (Firmware/078-64668-116.dmg.trustcache)…
Personalizing IMG4 component RestoreTrustCache…
Tag found
Sending RestoreTrustCache (12865 bytes)…
ramdisk-size=0x20000000
DEBUG: tss_response_get_path_by_entry: No entry ‘RestoreRamDisk’ in TSS response
NOTE: No path for component RestoreRamDisk in TSS, will fetch from build_identity
Extracting 078-64668-116.dmg (078-64668-116.dmg)…
Personalizing IMG4 component RestoreRamDisk…
Tag found
Sending RestoreRamDisk (102767817 bytes)…
DEBUG: tss_response_get_path_by_entry: No entry ‘RestoreDeviceTree’ in TSS response
NOTE: No path for component RestoreDeviceTree in TSS, will fetch from build_identity
Extracting DeviceTree.d20ap.im4p (Firmware/all_flash/DeviceTree.d20ap.im4p)…
Personalizing IMG4 component RestoreDeviceTree…
Tag found
Sending RestoreDeviceTree (41472 bytes)…
DEBUG: tss_response_get_path_by_entry: No entry ‘RestoreSEP’ in TSS response
NOTE: No path for component RestoreSEP in TSS, will fetch from build_identity
Extracting sep-firmware.d20.RELEASE.im4p (Firmware/all_flash/sep-firmware.d20.RELEASE.im4p)…
Personalizing IMG4 component RestoreSEP…
Tag found
Sending RestoreSEP (1516289 bytes)…
DEBUG: tss_response_get_path_by_entry: No entry ‘RestoreKernelCache’ in TSS response
NOTE: No path for component RestoreKernelCache in TSS, will fetch from build_identity
Extracting kernelcache.release.iphone10 (kernelcache.release.iphone10)…
Personalizing IMG4 component RestoreKernelCache…
Tag found
Sending RestoreKernelCache (17959662 bytes)…
DEBUG: Waiting for device to disconnect…
ERROR: Failed to place device in restore mode
ERROR: Unable to place device into restore mode
Phone in recovery mode with logo Apple…
device: iphone 6s
ios: 14.3
PC: manjaro (arch)
idevicerestore: latest (aur)
#362 The above issue again…
i get:
idevicerestore: error while loading shared libraries: libimobiledevice-glue-1.0.so.0: cannot open shared object file: No such file or directory
when i try :
idevicerestore —erase —latest
ive no idea what to do
i have an iphone 7 plus model A1784
when running idevicerestore --erase --latest
i get
The following firmwares are currently being signed for iPhone9,4:
[1] 15.7 (build 19H12)
i pick 1 and it keeps running and after a while i get some errors
then it ends with
Checkpoint 1608 complete with code 0
ERROR: Unable to restore device```
any idea what to do?
Quick notes — Arch linux with latest kernel, AUR version of idevicerestore, device is an iPad mini 1st gen with cellular (A1455). In order for this device to be detected I had to connect to a rear USB port on my desktop. I will be omitting parts of the log tagged with key, as these might be something I shouldn’t share, and these don’t seem to be a part of the issue. Let me know if the full log is necessary.
irecv_event_cb: device 00000244e119bdf2 (udid: N/A) connected in Recovery mode
Found device in Recovery mode
opening device 05ac:1281...
irecv_copy_nonce_with_tag: WARNING: couldn't find tag SNON in string NONC:AD9F869900D2D2B09D44A3C3AB7AC7D65DB0BE94
found device with ECID 00000244e119bdf2
Setting to configuration 1
Setting to interface 0:0
Identified device as p107ap, iPad2,7
* Trying 172.67.83.193:443...
* Connected to api.ipsw.me (172.67.83.193) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted h2
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=Cloudflare, Inc.; CN=sni.cloudflaressl.com
* start date: May 31 00:00:00 2022 GMT
* expire date: May 31 23:59:59 2023 GMT
* subjectAltName: host "api.ipsw.me" matched cert's "*.ipsw.me"
* issuer: C=US; O=Cloudflare, Inc.; CN=Cloudflare Inc ECC CA-3
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* Using HTTP2, server supports multiplexing
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* h2h3 [:method: GET]
* h2h3 [:path: /v3/device/iPad2,7]
* h2h3 [:scheme: https]
* h2h3 [:authority: api.ipsw.me]
* h2h3 [user-agent: InetURL/1.0 idevicerestore/1.0.0]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x559e2902b8f0)
> GET /v3/device/iPad2,7 HTTP/2
Host: api.ipsw.me
user-agent: InetURL/1.0 idevicerestore/1.0.0
accept: */*
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 200
< date: Fri, 24 Jun 2022 05:10:13 GMT
< content-type: application/json
< vary: Accept-Encoding
< vary: Origin
< access-control-allow-origin: *
< access-control-expose-headers: X-Data-Location, X-Server-Location
< cache-control: public
< content-md5: HUwIglkR1vvGoY8g3/C+rw==
< content-security-policy: default-src https: 'unsafe-eval' 'unsafe-inline'; object-src 'none'
< expires: Fri, 24 Jun 2022 05:20:24 GMT
< x-content-type-options: nosniff
< x-data-location: database
< x-frame-options: DENY
< x-frame-options: DENY
< x-server-location: 278e4565bea8
< x-xss-protection: 1; mode=block
< strict-transport-security: max-age=15552000; preload
< last-modified: Fri, 24 Jun 2022 04:20:24 GMT
< cf-cache-status: HIT
< age: 212
< expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
< report-to: {"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v3?s=PsYWc8q6RU1vE6WdduXFH3g64WY7pb2vPJCvXycU80Dsix3BTgPUiVasFMkgSNA2Jfcwim%2BlREl4rGXusgr0FNGWm6TcPwJbfWAX8R%2FJBBmBRiKwFlnr%2BBY7tNpT"}],"group":"cf-nel","max_age":604800}
< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< server: cloudflare
< cf-ray: 7202f4aaf8b68720-ORD
< alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
<
* Connection #0 to host api.ipsw.me left intact
The following firmwares are currently being signed for iPad2,7:
[1] 9.3.6 (build 13G37)
[2] 9.3.5 (build 13G36)
Select the firmware you want to restore: 1
Selected firmware 9.3.6 (build 13G37)
Verifying 'iPad2,7_9.3.6_13G37_Restore.ipsw'...
Checksum matches.
Extracting BuildManifest from IPSW
Product Version: 9.3.6
Product Build: 13G37 Major: 13
opening device 05ac:1281...
irecv_copy_nonce_with_tag: WARNING: couldn't find tag SNON in string NONC:AD9F869900D2D2B09D44A3C3AB7AC7D65DB0BE94
found device with ECID 00000244e119bdf2
Setting to configuration 1
Setting to interface 0:0
INFO: device serial number is F9FPF174F19M
Device supports Image4: false
Variant: Customer Erase Install (IPSW)
This restore will erase your device data.
################################ [ WARNING ] #################################
# You are about to perform an *ERASE* restore. ALL DATA on the target device #
# will be IRREVERSIBLY DESTROYED. If you want to update your device without #
# erasing the user data, hit CTRL+C now and restart without -e or --erase #
# command line switch. #
# If you want to continue with the ERASE, please type YES and press ENTER. #
##############################################################################
> YES
Checking IPSW for required components...
All required components found in IPSW
Using cached filesystem from 'iPad2,7_9.3.6_13G37_Restore/058-48288-040.dmg'
Getting device's ECID for TSS request
Found ECID 2494857592306
Getting ApNonce in recovery mode... ad 9f 86 99 00 d2 d2 b0 9d 44 a3 c3 ab 7a c7 d6 5d b0 be 94
Trying to fetch new SHSH blob
Getting SepNonce in recovery mode...
NOTE: Unable to find BbFactoryActivationManifestKeyHash node
NOTE: Unable to find BbFDRSecurityKeyHash node
NOTE: Unable to find BbSkeyId node
DEBUG: Applying restore request rules for entry AppleLogo
DEBUG: Applying restore request rules for entry BatteryCharging0
DEBUG: Applying restore request rules for entry BatteryCharging1
DEBUG: Applying restore request rules for entry BatteryFull
DEBUG: Applying restore request rules for entry BatteryLow0
DEBUG: Applying restore request rules for entry BatteryLow1
DEBUG: Applying restore request rules for entry BatteryPlugin
DEBUG: Applying restore request rules for entry DeviceTree
DEBUG: Applying restore request rules for entry KernelCache
DEBUG: Applying restore request rules for entry LLB
DEBUG: Applying restore request rules for entry RecoveryMode
DEBUG: Applying restore request rules for entry RestoreDeviceTree
DEBUG: Applying restore request rules for entry RestoreKernelCache
DEBUG: Applying restore request rules for entry RestoreLogo
DEBUG: Applying restore request rules for entry RestoreRamDisk
DEBUG: Applying restore request rules for entry iBEC
DEBUG: Applying restore request rules for entry iBSS
DEBUG: Applying restore request rules for entry iBoot
common.c:printing 3780 bytes plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
—omitted—
Received SHSH blobs
Sending APTicket (2732 bytes)
DEBUG: tss_response_get_path_by_entry: No entry 'iBEC' in TSS response
NOTE: No path for component iBEC in TSS, will fetch from build_identity
Extracting iBEC.p107.RELEASE.dfu...
DEBUG: tss_response_get_data_by_key: No entry 'ApImg4Ticket' in TSS response
DEBUG: tss_response_get_blob_by_entry: No entry 'iBEC' in TSS response
NOTE: No SHSH blob found for component iBEC
Not personalizing component iBEC...
Sending iBEC (283020 bytes)...
Waiting for device to disconnect...
irecv_event_cb: device 00000244e119bdf2 (udid: N/A) disconnected
Waiting for device to reconnect in recovery mode...
irecv_event_cb: device 00000244e119bdf2 (udid: N/A) connected in Recovery mode
opening device 05ac:1281...
irecv_copy_nonce_with_tag: WARNING: couldn't find tag SNON in string NONC:AD9F869900D2D2B09D44A3C3AB7AC7D65DB0BE94
found device with ECID 00000244e119bdf2
Setting to configuration 1
Setting to interface 0:0
Segmentation fault
I have tried with and without the arguments -d -e and -l, same result either way.
Unhandled status message (68)
/Users/test/gitlab/fixios-opensource_mac/src/idevicerestore-master/src/common.c:printing 40622 bytes plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Successful</key>
<false/>
<key>Log</key>
<string>[09:48:50.0842-GMT]{3>7} CHECKPOINT
....
ERROR: Unable to successfully restore device
Checkpoint 1608 complete with code 0
ERROR: Unable to restore device
idevicerestore_start result:-68
Xcode is build the project and when build is success, I get this message «The bundle’s Info.plist does not contain a CFBundleVersion key or its value is not a string». What is that mean. There is my info.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key></key>
<string></string>
<key>Additional_Version_String</key>
<string>Updated on build</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIcons</key>
<dict/>
<key>CFBundleIcons~ipad</key>
<dict/>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>Commit_Short_Hash</key>
<string>Updated on build</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSContactsUsageDescription</key>
<string>Vialer needs access to your contacts to make calling to your contacts possible</string>
<key>NSMicrophoneUsageDescription</key>
<string>Vialer needs access to your microphone to make calling possible</string>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>fetch</string>
<string>remote-notification</string>
<string>voip</string>
</array>
<key>UIMainStoryboardFile</key>
<string>MainStoryboard</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIRequiresPersistentWiFi</key>
<true/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackTranslucent</string>
<key>UIStatusBarTintParameters</key>
<dict>
<key>UINavigationBar</key>
<dict>
<key>Style</key>
<string>UIBarStyleDefault</string>
<key>Translucent</key>
<true/>
</dict>
</dict>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
</dict>
</plist>
asked Mar 30, 2017 at 7:42
4
I have the same issue with CFBuildVersion and than i found that in my project Target there is no build version inserted.
So i have just inserted build version and issue solved.
answered Dec 26, 2019 at 6:15
Hardik VyasHardik Vyas
1,83519 silver badges43 bronze badges
2
I followed solutions from everywhere and these are the steps I ended up with that worked for me:
Solution:
- Open the terminal and fix any relevant issues
flutter doctor
displays:
- Run
flutter clean
- Delete the Podfile, Podfile.lock and the Pods directory from your ios project
- Open the
Runner.xcworkspace
project in Xcode
- Update the build number as @Hardik Vyas mentioned
- As @iDevOrz mentioned, Erase All Content and Settings from the simulator
- Clean, build and run the app in Xcode
answered Jan 19, 2020 at 2:07
ArtiomLKArtiomLK
1,92018 silver badges24 bronze badges
1
I have the same problem.
I fix it by Simulator menu -> Hardware -> Erase All Content and Setting.
Maybe it’s a Simulator bug.
answered Jun 13, 2019 at 7:33
iDevOrziDevOrz
6507 silver badges15 bronze badges
2
Just add version and build number
answered May 28, 2021 at 6:17
Abir AhsanAbir Ahsan
2,35923 silver badges46 bronze badges
0
Xcode 12.5 — It might be a bug unrelated to the plist
I have Big Sur and Xcode 12.5 (not beta) and I created a new SwiftUI project.
To save time I dragged a folder containing a bunch of json
files in my project navigator. The folder was named «Resources» but I hope it was not the issue.
Before dragging the folder the project compiled. After having the new folder it would not compile anymore and would give me the error as below. Oddest bug I found.
Solution, I added the files one by one and then I created the enclosing folder, then it worked. And it is reproducible! I spent 30 minutes today on this. Luckily it was at the very beginning of a project and could compare and see when it would stop compiling..
answered May 2, 2021 at 13:32
multitudesmultitudes
2,6631 gold badge19 silver badges27 bronze badges
2
The fix for me was to add a build number to the target.
Click on your target, go to General, then underneath Identity is a field for Build.
answered Oct 7, 2019 at 18:23
flexaargoflexaargo
611 silver badge2 bronze badges
Just Insert the build version to your project
answered Apr 10, 2020 at 15:08
add to info.plist in code mode worked for me
<plist version="1.0">
<string>1.0</string>
</plist>
answered Aug 12, 2021 at 8:38
LogicLogic
7051 gold badge9 silver badges27 bronze badges
I just added this key CFBundleVersion
and copied the value from the above key as shown in the .plist (see project navigator on the left):
answered Dec 12, 2021 at 21:38
I just edit my project’s «.plist» file and added a CFBundleShortVersionString
entry with some value.
answered Feb 9, 2022 at 22:17
Inside your .plist, check whether you have this key or not.
Bundle version string (short)
answered May 24, 2022 at 7:18
I have the same issue with CFBuildVersion. I noticed my Target had no build version.
So I filled in the version and build, which solved my issue.
James Risner
3,70411 gold badges20 silver badges39 bronze badges
answered Oct 25, 2022 at 10:53
For me, it was crashing because of a missing SDK which was linked properly but I forgot to embed it in the application. The app should normally crash with dyld: not loaded ...
but instead, it showed this totally unrelated Info.plist issue. 🤯
That said, I would say it is a bug on the Apple’s side and pretty much everything that prevents the app from starting can produce this error.
Xcode 14.2, native M1 mode.
I hope it helps.
answered 18 hours ago
Search Issue Tracker
Fixed in 1.0.2
Found in [Package]
preview — 0.2.4
How to reproduce:
1. Open the attached project (‘1149977repro.zip’)
2. Build for WebGL
Expected results: Project is successfully built
Actual results: Project is unable to be built because of 4 identical NetworkDiscovery.cs errors
Reproducible with: 2019.1.1f1, 2019.2.0a14, 2019.3.0a1
and with all package versions
Multiplayer HLAPI package was introduced in 2019.1.0a12
The build error occurs in 4 different places in Network Discovery.cs:
LibraryPackageCachecom.unity.multiplayer-hlapi@1.0.2RuntimeNetworkDiscovery.cs(317,30): error CS0117: ‘NetworkTransport’ does not contain a definition for ‘SetMulticastLock’
LibraryPackageCachecom.unity.multiplayer-hlapi@1.0.2RuntimeNetworkDiscovery.cs(348,30): error CS0117: ‘NetworkTransport’ does not contain a definition for ‘SetMulticastLock’
LibraryPackageCachecom.unity.multiplayer-hlapi@1.0.2RuntimeNetworkDiscovery.cs(388,30): error CS0117: ‘NetworkTransport’ does not contain a definition for ‘SetMulticastLock’
LibraryPackageCachecom.unity.multiplayer-hlapi@1.0.2RuntimeNetworkDiscovery.cs(449,34): error CS0117: ‘NetworkTransport’ does not contain a definition for ‘SetMulticastLock’
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 |
using System; using System.Collections.Generic; using System.Text; namespace ConsoleApp6 { class Workwithstr { string s; public Workwithstr(string s) { this.s = s; } public void Ex1(string s) { DateTime dt = DateTime.Now; for (int i = 0; i < 100000; i++) { s += "1"; } Console.WriteLine("Со строкой: {0}", DateTime.Now - dt); dt = DateTime.Now; StringBuilder sb = new StringBuilder(); for (int i = 0; i < 100000; i++) { sb.Append("1"); } Console.WriteLine("Со StringBuilder: {0}", DateTime.Now - dt); } static public int Ex2(string s) { int c = 0; for (int i = 0; i < s.Length; i++) if (s[i] == ' ') c++; return c; } static public int Ex3(string s) { char prob = ' '; int k = 1; for (int i = 0; i < s.Length; i++) { if (s[i] == prob) { k++; } } return k; } public void Ex4(string s) { StringBuilder sb = new StringBuilder(s); int n = 0; char M = sb[0]; for (int i = 1; i < s.Length; i++) { if (sb[i] == ' ') { sb[n] = Char.ToUpper(s[i - 1]); sb[i - 1] = Char.ToUpper(M); n = i + 1; M = sb[n]; } if (i == sb.Length - 1) { sb[n] = Char.ToUpper(s[i]); sb[i] = Char.ToUpper(M); } } Console.WriteLine(sb); } public void Ex5(string s) { Console.WriteLine("Введите предложение:"); string str = Console.ReadLine(); char[] prd = str.ToLower().ToCharArray(); char[] vowels = new char[] { 'а', 'и', 'е', 'ё', 'о', 'у', 'ы', 'э', 'ю', 'я' }; char[] conson = new char[] { 'б', 'в', 'г', 'д', 'ж', 'з', 'й', 'к', 'л', 'м', 'н', 'п', 'р', 'с', 'т', 'ф', 'х', 'ц', 'ч', 'ш', 'щ' }; char[] punct = new char[] { '.', '?', '!', ':', ';', ',', '-', '(', ')', '"' }; int vowelsCount = 0; int consonCount = 0; int punctCount = 0; { foreach (char ch in prd) foreach (char cha in vowels) if (ch == cha) vowelsCount++; Console.WriteLine("Гласные: " + vowelsCount); } { foreach (char ch in prd) foreach (char cha in punct) if (ch == cha) punctCount++; Console.WriteLine("Знаки препинания: " + punctCount); } { foreach (char ch in prd) foreach (char cha in conson) if (ch == cha) consonCount++; Console.WriteLine("Согласные: " + consonCount); } } public void Ex6(string s) { Console.Write("Введите предложение: "); string prd = Console.ReadLine(); Console.Write("Введите символ: "); char c = (char)Console.Read(); int i = prd.IndexOf(c); if (i < 0) { Console.WriteLine("Такого символа в предложении нет"); } else { Console.WriteLine("Найден символ с номером {0}", i + 1); if (i > 0) { Console.WriteLine("Символ слева от него: {0}", prd[i - 1]); } if (i < prd.Length - 1) { Console.WriteLine("Символ справа от него: {0}", prd[i + 1]); } } } static public int Ex7(string s) { int k = 0; for (int i = 0; i < s.Length; i++) { int c = s[i]; while (c > 0) { k += c % 10; c /= 10; } } return k; } static public StringBuilder Ex8(string vs) { StringBuilder s = new StringBuilder(vs); string vr = "00.00.0000"; StringBuilder r = .StringBuilder(vr); if (s[1] == '/') { r[4] = s[0]; if (s[3] == '/') { r[1] = s[2]; } else { r[0] = s[2]; r[1] = s[3]; } } else { r[3] = s[0]; r[4] = s[1]; if (s[4] == '/') { r[1] = s[3]; } else { r[0] = s[3]; r[1] = s[4]; } } for (int i = 1; i < 5; i++) { r[r.Length - i] = s[s.Length - i]; } return r; } public void Ex9(string s) { string alph = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя"; StringBuilder st = new StringBuilder(s); char[] prob = { ' ' }; double kpower = 0; double kwords = 1; for (int i = 0; i < s.Length; i++) { if (s.Substring(i, 1).IndexOfAny(prob) != -1) kwords++; } for (int i = 0; i < st.Length; i++) { char[] x = { s[i] }; for (int j = 0; j < alph.Length; j++) { if (alph.Substring(j, 1).IndexOfAny(x) != -1) kpower = kpower + j; } } double mean = kpower / kwords; Console.WriteLine(mean); double power = 0; int n = 0; int m = 0; for (int i = 0; i < st.Length; i++) { if (s.Substring(i, 1).IndexOfAny(prob) != -1) { m = i; for (int j = n; j < m; j++) { char[] x = { s[j] }; for (int l = 0; l < alph.Length; l++) { if (alph.Substring(l, 1).IndexOfAny(x) != -1) power = power + l; } } if (power < mean) { for (int j = 0; j < m; j++) { if (j >= n) { st[j] = System.Char.ToLower(st[j]); } } } else { for (int j = 0; j < m; j++) { if (j >= n) { st[j] = System.Char.ToUpper(st[j]); } } } n = i + 1; } m = i + 1; } for (int j = n; j < m; j++) { char[] x = { s[j] }; for (int l = 0; l < alph.Length; l++) { if (alph.Substring(l, 1).IndexOfAny(x) != -1) power = power + l; } } if (power < mean) { for (int j = 0; j < m; j++) { if (j >= n) { st[j] = System.Char.ToLower(st[j]); } } } else { for (int j = 0; j < m; j++) { if (j >= n) { st[j] = System.Char.ToUpper(st[j]); } } } Console.WriteLine(st); } static int CalculatePower(string word) { var chars = new HashSet<char>(); foreach (var letter in word) { chars.Add(letter); } return chars.Count; } static void SortByLengthAndPower(string[] words) { for (int i = 0; i < words.Length; i++) { for (int j = 0; j < words.Length - i - 1; j++) { if (words[j].Length > words[j + 1].Length) { var temp = words[j]; words[j] = words[j + 1]; words[j + 1] = temp; } if (words[j].Length == words[j + 1].Length) { if (CalculatePower(words[j]) > CalculatePower(words[j + 1])) { var temp = words[j]; words[j] = words[j + 1]; words[j + 1] = temp; } } } } } public void Ex10(string s) { var words = s.Split(' '); SortByLengthAndPower(words); foreach (var word in words) { Console.Write(word + " "); } } public void Ex11(string s) { StringBuilder sb = new StringBuilder(s); string g = "ауоыиэяюёе"; string st = "бвгджзйклмнпрстфхцчшщьъ"; string alf = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя"; for (int i = 0; i < sb.Length; i++) { char A = Char.ToLower(s[i]); bool chec = true; for (int j = 0; j < g.Length; j++) { int a; if (Char.ToLower(sb[i]) == g[j]) { for (int t = 0; t < alf.Length; t++) { if (alf[t] == A) { a = t + 10; if (a >= alf.Length) { a = a - alf.Length; } sb[i] = System.Char.ToUpper(alf[a]); chec = false; } } } } for (int j = 0; j < st.Length; j++) { int a; if ((System.Char.ToLower(sb[i]) == st[j]) && chec) { for (int t = 0; t < alf.Length; t++) { if (alf[t] == A) { a = t - 10; if (a < 0) { a = alf.Length + a; } sb[i] = alf[a]; } } } } } Console.WriteLine("Зашифрованное предложение:"); Console.WriteLine(sb); string ALF = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"; for (int i = 0; i < sb.Length; i++) { char A = sb[i]; bool chec = true; for (int j = 0; j < ALF.Length; j++) { int a; if (A == ALF[j]) { a = j - 10; if (a < 0) { a = ALF.Length + a; } sb[i] = alf[a]; chec = false; } } for (int j = 0; j < alf.Length; j++) { int a; if ((A == alf[j]) && chec) { a = j + 10; if (a >= alf.Length) { a = a - alf.Length; } sb[i] = alf[a]; } } } sb[0] = System.Char.ToUpper(sb[0]); for (int i = 2; i < sb.Length; i++) { if (sb[i - 2] == '.' | sb[i - 2] == '?' | sb[i - 2] == '!') { sb[i] = System.Char.ToUpper(sb[i]); } } Console.WriteLine("Расшифрованное предложение:"); Console.WriteLine(sb); } public void Ex12(string s) { string k = ""; for (int i = s.Length; i > 0; i--) k += s[i - 1]; Console.WriteLine(k); string q = ""; for (int t = 0; t < s.Length; t++) if (s[t] == ' ') { for (int w = t + 1; w < s.Length; w++) q += s[w]; q += s[t]; for (int w = 0; w < t; w++) q += s[w]; Console.WriteLine(q); } string l = ""; for (int t = 0; t < s.Length; t++) if (s[t] == ' ') { for (int h = t; h > 0; h--) l += s[h - 1]; l += s[t]; for (int j = s.Length; j > t; j--) l += s[j - 1]; Console.WriteLine(l); Console.ReadLine(); } } public void Ex13() { var word = Console.ReadLine().ToUpper().ToCharArray(); var key = Console.ReadLine().ToCharArray(); var result = new Char[word.Length]; for (int i = 0; i < word.Length; i++) { result[i] = (char)((int)word[i] + (int)key[i % key.Length] - 48); } foreach (var letter in result) { Console.Write(letter); } } public static bool IsNumber(string s) { int k = 0; for (int i = 0; i < s.Length; i++) { if ((s[i] == '0') || (s[i] == '1') || (s[i] == '2') || (s[i] == '3') || (s[i] == '4') || (s[i] == '5') || (s[i] == '6') || (s[i] == '7') || (s[i] == '8') || (s[i] == '9')) k++; } if (k == s.Length) return true; return false; } public static bool Cut(ref string s) { if ((s[0] == '+') && (s[1] == '7')) { s = s.Substring(2); return true; } if (s[0] == '8') { s = s.Substring(1); return true; } return false; } public static bool Check1(string s) { if (!Cut(ref s)) return false; if (s.Length != 10) return false; if (!IsNumber(s)) return false; return true; } public static bool Check2(string s) { if (!Cut(ref s)) return false; if (s.Length != 12) return false; if ((s[0] != '(') || (s[4] != ')')) return false; else { s = s.Replace('(', '0'); s = s.Replace(')', '0'); } if (!IsNumber(s)) return false; return true; } public static bool Check3(string s) { if (!Cut(ref s)) return false; if (s.Length != 14) return false; if ((s[0] != ' ') || (s[4] != ' ') || (s[8] != ' ') || (s[11] != ' ')) return false; else { s = s.Replace(' ', '0'); } if (!IsNumber(s)) return false; return true; } public static bool Check4(string s) { if (!Cut(ref s)) return false; if (s.Length != 16) return false; if ((s[0] != ' ') || (s[1] != '(') || (s[5] != ')') || (s[6] != ' ') || (s[10] != ' ') || (s[13] != ' ')) return false; else { s = s.Replace('(', '0'); s = s.Replace(')', '0'); s = s.Replace(' ', '0'); } if (!IsNumber(s)) return false; return true; } public static bool Check5(string s) { if (!Cut(ref s)) return false; if (s.Length != 14) return false; if ((s[0] != '(') || (s[4] != ')') || (s[8] != '-') || (s[11] != '-')) return false; else { s = s.Replace('(', '0'); s = s.Replace(')', '0'); s = s.Replace('-', '0'); } if (!IsNumber(s)) return false; return true; } static void Search(char[] a, string s) { char[] b = new char[a.Length]; int[] c = new int[s.Length]; Array.Copy(a, b, a.Length); int k = 0; for (int i = 0; i < s.Length; i++) { for (int j = 0; j < b.Length; j++) { if (s[i] == b[j]) { b[j] = '1'; c[k] = j + 1; k++; break; } } } if (k == s.Length) { Array.Sort(c); string res = ""; for (int i = 0; i < c.Length; i++) { res = res + c[i] + " "; } Console.WriteLine("могу составить " + res); } else Console.WriteLine("не могу составить"); } public void Ex15() { Random rnd = new Random(); char[] a = new char[30]; for (int i = 0; i < 30; i++) { a[i] = Convert.ToChar(rnd.Next(1072, 1103)); Console.Write(a[i]); } Console.WriteLine(); Search(a, Console.ReadLine()); } public void Ex16(string s) { double a, b; Console.WriteLine("число"); a = Convert.ToDouble(Console.ReadLine()); b = Convert.ToInt32((a * 100) % 100); a = Math.Floor(a); if ((a % 10 == 1) && (a != 11)) { Console.Write("{0:0} руболь ", a); if ((b % 10 == 1) && (b != 11)) Console.WriteLine("{0:0} копейка", b); else if ((a % 10 >= 2) && (b % 10 <= 4) && (b != 12) && (b != 13) && (b != 14)) Console.WriteLine("{0:0} копейки", b); else Console.WriteLine("{0:0} копеек", b); } else if ((a % 10 >= 2) && (a % 10 <= 4) && (a != 12) && (a != 13) && (a != 14)) { Console.Write("{0:0} рубля ", a); if ((b % 10 == 1) && (b != 11)) Console.WriteLine("{0:0} копейка", b); else if ((b % 10 >= 2) && (b % 10 <= 4) && (b != 12) && (b != 13) && (b != 14)) Console.WriteLine("{0:0} копейки", b); else Console.WriteLine("{0:0} копеек", b); } else { Console.Write("{0:0} рублей ", a); if ((b % 10 == 1) && (b != 11)) Console.WriteLine("{0:0} копейка", a); else if ((b % 10 >= 2) && (b % 10 <= 4) && (b != 12) && (b != 13) && (b != 14)) Console.WriteLine("{0:0} копейки", b); else Console.WriteLine("{0:0} копеек", b); } } } } |
Пишет-
Quaternion
does not contain a definition for
indetity
Код:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LevelManager : MonoBehaviour
{
public static LevelManager instance;
public Transform RespawnPoint;
public GameObject PlayerPrefab;
private void Awake ()
{
instance = this;
}
public void Respawn ()
{
Instantiate(PlayerPrefab, RespawnPoint.position, Quaternion.indetity);
}
}
-
Вопрос задан18 мар. 2022
-
33 просмотра
исправь indetity на identity в конце кода
public void Respawn ()
{
Instantiate(PlayerPrefab, RespawnPoint.position, Quaternion.identity);
}
Пригласить эксперта
-
Показать ещё
Загружается…
09 февр. 2023, в 15:06
2000 руб./за проект
09 февр. 2023, в 15:02
12000 руб./за проект
09 февр. 2023, в 14:22
1500 руб./за проект
Минуточку внимания
In this azure tutorial, we will discuss how to fix the error, Error CS1061 ‘IConfigurationBuilder’ does not contain a definition for ‘AddEnvironmentVariables’. This error I got while working with Azure function to access the app settings using the Visual Studio.
Table of Contents
- Error CS1061 ‘IConfigurationBuilder’ does not contain definition for ‘AddEnvironmentVariables’
- Error CS1061 ‘IConfigurationBuilder’ does not contain definition for ‘AddEnvironmentVariables’ [Solved]
- Wrapping Up
I was working with the Azure Functions and was trying to access application settings using Visual Studio, I got the error.
- response_type ‘id_token’ is not enabled for the application
- The term ‘get-azuresubscription’ is not recognized
The Azure function was like below
public static class MyProductHTTPFunction
{
[FunctionName("MyProductHTTPFunction")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
ILogger log, ExecutionContext context)
{
log.LogInformation("MyProductHTTPFunction function processed a request.");
var configurationBuilder = new ConfigurationBuilder()
.SetBasePath(context.FunctionAppDirectory)
.AddJsonFile("local.settings.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables()
.Build();
string myappsettingsValue = configurationBuilder["appsettingkey"];
You can see here
The exact error message was as below
Error CS1061 ‘IConfigurationBuilder’ does not contain a definition for ‘AddEnvironmentVariables’ and no accessible extension method ‘AddEnvironmentVariables’ accepting a first argument of type ‘IConfigurationBuilder’ could be found (are you missing a using directive or an assembly reference?)
Error CS1061 ‘IConfigurationBuilder’ does not contain definition for ‘AddEnvironmentVariables’ [Solved]
To fix this error, we need to add few NuGet Packages. To do that follow the below steps
Right click on the Project and click on the Manage NuGet Packages
You need to add the Microsoft.Extensions.Configuration.EnvironmentVariables package like below. Search for the same package and click on the Install button.
Same way, you can add the Nuget package Microsoft.Extensions.Configuration.UserSecrets.
The above are the two packages you need to install, if you are getting the error due to AddEnvironmentVariables().
There is a chance you might get the same error for the SetBasePath() method. In that case, you need to add one Nuget package in the same way as above i.e Microsoft.Extensions.Configuration.Abstractions.
This will fix the issue in case of SetBasePath() method.
Also, You might get the same error for the AddJsonFile() method. To fix the issue you need to install two Nuget Packages that are Microsoft.Extensions.Configuration.FileExtensions and Microsoft.Extensions.Configuration.Json.
And also, the below package
You may also like following the below Articles
- No match was found for the specified search criteria and module names ‘AzTable’
- CS1061 C# ‘HttpRequest’ does not contain a definition for ‘Content’ and no accessible extension method ‘Content’ accepting a first argument of type ‘HttpRequest’ could be found
- The Term ‘Connect-AzureRmAccount’ is Not Recognized
- The term ‘register-AzureProvider’ is not recognized as the name of a cmdlet
- The term ‘Select-AzureSubscription’ is not recognized as the name of a cmdlet
Wrapping Up
In this article, we have discussed how to fix the error Error CS1061 ‘IConfigurationBuilder’ does not contain definition for ‘AddEnvironmentVariables. The above solution will also fix the below issues
- iconfigurationbuilder does not contain a definition for addenvironmentvariables
- addenvironmentvariables not found
- ‘configurationbuilder’ does not contain a definition for ‘setbasepath’
- addenvironmentvariables
- iconfiguration does not contain a definition for get
- configurationbuilder addenvironmentvariables not found
- ‘configurationbuilder’ does not contain a definition for ‘addjsonfile’
- iconfigurationbuilder addenvironmentvariables
- ‘configurationbuilder’ does not contain a definition for ‘setbasepath’ and no accessible extension method ‘setbasepath’ accepting a first argument of type ‘configurationbuilder’ could be found
- ‘configurationbuilder’ does not contain a definition for ‘setbasepath’ and no accessible extension method ‘setbasepath’ accepting a first argument of type ‘configurationbuilder’ could be found (are you missing a using directive or an assembly reference?)
Hope it will help you to fix your issue !!!
User1428199325 posted
Any idea why am I getting this error? Error Message —> «IServiceCollection does not contain a definition for AddDefaultIdentity»
I’m using .NET Core v3.1 as per migration from v1.1
public class Program
{
public async static void Main(string[] args)
{
await Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder => {
webBuilder.UseContentRoot(Directory.GetCurrentDirectory());
webBuilder.UseKestrel();
webBuilder.UseAzureAppServices();
webBuilder.UseStartup<Startup>();
})
.Build()
.RunAsync();
}
}
public class Startup
{
public Startup(IConfiguration configuration, IHostEnvironment hostEnvironment)
{
Configuration = configuration;
HostEnvironment = hostEnvironment;
//ConfigurationBuilder builder = new ConfigurationBuilder();
//Configuration = builder.Build();
}
public IConfiguration Configuration { get; }
protected IApplicationBuilder ApplicationBuilder { get; private set; }
public IHostEnvironment HostEnvironment { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
// services.AddRazorPages();
// This is cookie authentication service.
// [ Old Version #3 ]
//services.AddIdentity<ApplicationUser, IdentityRole<Guid>>(options => {
// // [ Old version #1 ]
// //options.Cookies.ApplicationCookie.LoginPath = new PathString(«/Home/Index»);
// //options.Cookies.ApplicationCookie.SlidingExpiration = true;
// //options.Cookies.ApplicationCookie.ExpireTimeSpan = TimeSpan.FromMinutes(this.Configuration.GetValue<int?>(«Authentication:SlidingExpirationTime»).Value);
// //options.Cookies.ApplicationCookie.AccessDeniedPath = new PathString(«/Home/AccessDenied»);
// // [ Old version #2 ]
// //options.Password.RequireUppercase = false;
// //options.Password.RequireLowercase = false;
// //options.Password.RequireNonAlphanumeric = false;
// //options.Password.RequireDigit = false;
// //options.Password.RequiredLength = 7;
//})
// [ Old Version #3 ]
//.AddEntityFrameworkStores<ApplicationContext, Guid>()
//.AddDefaultTokenProviders();
// [ Old Version #3 — replacement ]
services.AddDefaultIdentity<ApplicationUser>() // «ApplicationUser» is named incorrectly, it should be «IdentityUser» instead, as per Microsoft documentation.
.AddRoles<IdentityRole<Guid>>()
.AddEntityFrameworkStores<ApplicationContext, Guid>() // FYI — AddEntityFrameworkStores() deal with role that derives from IdentityRole, as per documentation.
//.AddDefaultUI()
.AddDefaultTokenProviders();
// [ Old version #1 — replacement ]
services.ConfigureApplicationCookie(options =>
{
options.LoginPath = new PathString(«/Home/Index»);
options.SlidingExpiration = true;
options.ExpireTimeSpan = TimeSpan.FromMinutes(this.Configuration.GetValue<int?>(«Authentication:SlidingExpirationTime»).Value);
options.AccessDeniedPath = new PathString(«/Home/AccessDenied»);
});
// [ Old version #2 — replacement ]
services.Configure<IdentityOptions>(options =>
{
options.Password.RequireUppercase = false;
options.Password.RequireLowercase = false;
options.Password.RequireNonAlphanumeric = false;
options.Password.RequireDigit = false;
options.Password.RequiredLength = 7;
});
services.AddMvc();
services.AddSession();
//services.Configure<AuthorizationOptions>(options =>
//{
//});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler(«/Error»);
// The default HSTS value is 30 days. You may want to change this for production scenarios, see
https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
});
// Config Exception.
if (env.IsDevelopment())
app.UseDeveloperExceptionPage();
else
app.UseExceptionHandler(«/Home/ErrorPage.html»);
app.UseStaticFiles(); // Note, we are not authenticating for static files if this is before them
app.UseSession();
app.UseAuthentication();
// MVC.
//app.UseMvc(routes => routes.MapRoute(«default», «{controller=Home}/{action=Index}/{id?}»));
}
}
}
public class ApplicationUser : IdentityUser<Guid>, IUser
{
}
public interface IUser
{
}
public class ApplicationContext : IdentityDbContext<ApplicationUser, IdentityRole<Guid>, Guid>
{
public ApplicationContext(DbContextOptions<ApplicationContext> options) : base(options)
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
}
}
<Project Sdk=»Microsoft.NET.Sdk.Web»>
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include=»Microsoft.ApplicationInsights.AspNetCore» Version=»2.0.0″ />
<PackageReference Include=»Microsoft.AspNetCore.DataProtection» Version=»3.1.3″ />
<PackageReference Include=»Microsoft.AspNetCore.DataProtection.AzureStorage» Version=»1.0.2″ />
<PackageReference Include=»Microsoft.AspNetCore.Diagnostics» Version=»1.1.2″ />
<PackageReference Include=»Microsoft.AspNetCore.Mvc.Formatters.Xml» Version=»1.1.3″ />
<PackageReference Include=»Microsoft.AspNetCore.Session» Version=»1.1.2″ />
<PackageReference Include=»Microsoft.AspNetCore.StaticFiles» Version=»1.1.2″ />
<PackageReference Include=»Microsoft.Extensions.Configuration.Binder» Version=»3.1.3″ />
<PackageReference Include=»Microsoft.Extensions.Configuration.CommandLine» Version=»3.1.3″ />
<PackageReference Include=»Microsoft.Extensions.Hosting» Version=»3.1.3″ />
<PackageReference Include=»Microsoft.Extensions.Logging.Console» Version=»3.1.3″ />
<PackageReference Include=»Microsoft.EntityFrameworkCore.SqlServer» Version=»3.1.3″ />
<PackageReference Include=»Microsoft.EntityFrameworkCore.InMemory» Version=»3.1.3″ />
<PackageReference Include=»Microsoft.AspNetCore.Identity» Version=»2.2.0″ />
<PackageReference Include=»Microsoft.AspNetCore.Identity.EntityFrameworkCore» Version=»3.1.3″ />
<PackageReference Include=»Microsoft.AspNetCore.Mvc» Version=»1.1.3″ />
<PackageReference Include=»Microsoft.Extensions.Configuration.Json» Version=»3.1.3″ />
<PackageReference Include=»Microsoft.AspNetCore.Mvc» Version=»1.1.3″ />
<PackageReference Include=»Microsoft.AspNetCore.Mvc.Formatters.Json» Version=»1.1.3″ />
<PackageReference Include=»Microsoft.AspNetCore.Server.IISIntegration» Version=»1.1.2″ />
<PackageReference Include=»Microsoft.AspNetCore.Server.Kestrel» Version=»1.1.2″ />
<PackageReference Include=»Microsoft.AspNetCore.StaticFiles» Version=»1.1.2″ />
<PackageReference Include=»Newtonsoft.Json» Version=»12.0.2″ />
<PackageReference Include=»Microsoft.AspNetCore.AzureAppServicesIntegration» Version=»1.0.2″ />
</ItemGroup>