First Gone In 60 Seconds

0 views
Skip to first unread message

Bran Bast

unread,
Aug 4, 2024, 10:05:13 PM8/4/24
to exocbore
Myapp first notification disappears after few seconds itself when app is in background even when the user has not taken any action to that notification. After that every notification remains in place.

The issue is due to manually setting the badge number. I had code in my app to manually set the badge number on application launch (either to 0 or to a value saved in NSUserDefaults, depending on the situation) and found that doing either one of these would cause the notification banner to disappear and the sound would cut off mid-notification. To solve it, I checked the applicationState and if it was UIApplicationStateBackground I did not touch the badge number.


working in iMovie and the first 2-3 seconds of audio is missing from each clip. I have tried to restart the project, looked for updates, restarted my computer, etc. I've also played around with the volume in the editor. Nothing is working. The audio is there when I click at the start at the video but when I play the movie as they transition from clip to clip. it's missing.


The first thing to try, since it is so easy, is to reset your preferences. To do that open iMovie while holding down the Option and Command keys and select to delete preferences in the box that appears. iMovie will open in a new library. Reopen your old library to get back to your projects. Now see if the audio plays properly.


You also should check your clips in the timeline to make sure that for some reason they have not been trimmed at the front. Put your cursor on the front edge of the clip and press-drag to the left just to be sure.


As a workaround, you could try re-encoding one of the clips with the free download, Handbrake, to H.264, Mp4/AAC, even it is already in that format. Handbrake will do it by default. Open Handbrake and click on File/Open Source and navigate to where you test video is located. Select the video to choose it. Then do File/Start Encoding. Then drag the re-encoded clip into iMovie to see if the beginning part of the audio plays. You can get Handbrake here:


iMovie 10 app from the Applications folder into the trash, but do not empty the trash. Sign in to the app store and open your purchases folder by clicking on your name at the bottom of the app store side bar. You will see


your purchases displayed, including iMovie 10. Redownload/update iMovie from there. If not successful, drag your present iMovie app out of the trash and return it to the Applications folder. However, it should be successful and then you can see if the redownloaded app plays the audio properly.


Whenever I reset / connect the Arduino while plugged in via USB, random things seam to happen and now I can't upload anything. The Arduino doesn't show up in the device manager in any form and the "Serial Port" menu in the programmer is empty. The problems that occur seemingly at random are:


It shows up under the device manager as COM 6 (usually) under the name "Arduino Micro Bootloader". But after a few seconds it disappears and the device manager refreshes and there is no sign of it. Usually an error from windows shows up saying that the device has malfunctioned (USB Device Not Recognized).


It shows up as Arduino Micro (but with the "no drivers" icon in device manager) and windows tries to install the drivers for it using Windows Update. I can't select the driver location myself and it eventually stops saying that the device was unplugged.


For a while I was having problems with the sketches just not uploading - the board was showing up but whenever I uploaded a sketch it would freeze at around 80% and eventually die with some error (don't remember what it was). I was able to fix it with the trick of holding the reset button and then clicking the upload button. This lasted for about 10 uploads but then it went into the current issue I have.


This seams to have started for no real reason. I have been working on this program for a few days and I have been uploading sketches to it constantly without issue. It just started the other day and degraded into what I have now. I have tried restarting the computer, using different USB cables, and different USB ports on the computer, to no avail.


I just was able to try this on a Linux Mint installation and haven't been able to get it working there either. I am able to successfully upload Blink (at least there are no errors or delays) but pin 13 doesn't blink. If I try to do a Serial.println() I never get anything in the Serial Monitor.


When I have it connected in Windows, I can now refresh the device manager and I can see the Micro as an unknown device and another device unknown device under USB controllers but I can't install any drivers for either of them.


I have the same problem exactly. Tried on multiple computers with same result. I can get the blink or fade sketch to load by pushing the reset, quickly going to tools to select com 6 & hit upload within the 8 seconds before it disappears from the Ports in Device Manager & Arduino software. Then it shows up in other devices. While in other devices , which it will stay, it will not accept the driver or update.....

I hope there is something else to try .


What happens too often and usually not on purpose is that someone did not properly select "Arduino Micro" under the Tools->Boards menu when they were trying to upload a new sketch to the Micro. So the wrong core code in the sketch got uploaded to the Micro, without the proper USB driver code as part of the sketch.


So what is happening when you reset the Micro the bootloader USB driver is running and shows up in Windows for a short time until it times out and then proceeds to execute the wrong sketch code without the proper USB core code. This will then show up in Windows as Unknown device.


Sorry for the slight bit of thread necromancy but I just wanted to say that this works! Under device manager, I still get 1 "unknown device" but under com it shows the Arduino Micro. I don't remember what was the last driver I installed, etc, but I just followed the advice of hiduino and success!


The trick is right after it finishes saying "Compiling sketch" - instantly afterwards - you must hit the reset button quickly. Don't hold the reset button - just a real quick tap right at the right second. Then done! To upload another sketch (to confirm it is working), you must select the proper com port under Tools->Serial port. But then you are good to go.


I'm running into the same problem except that I never had a good spell, just started off on the wrong foot with the Micro. Following the instructions which hiduino posted still have not resolved the issue. I can press the reset button and load a sketch, 'Blink' for example blinks the LED attached to pin 13. Unfortunately the COM port is still missing from Tools-->Serial Port, and it appears as 'USB IO Board' in the device manager.


Update: I uninstalled the device in device manager. After plugging the Micro back in, it appeared as 'Arduino Micro' and driver installation failed. Some progress. When I follow the steps to update the driver, navigate to folder, etc, Windows claims that the drivers are not there. Diving in a specifying have disk and selecting the specific Arduino Micro driver causes a BSOD, oh joy. Ran into that one 5x.


it worked fine for a while on the first board. after a day or so though i get 'serial port already in use'. i also get a weird leonardo error. tried it on a second board (also a micro) and i get the same error message. previously i got a leonardo message so i changed the board time from 'micro' to 'leonardo' and it worked. BUT i get this weird USB keyboard setup menu when i plug in the micro!


I came across this thread after searching for this exact problem. I followed the instructions provided by 'hiduino' and ended up finding success tweaking them slightly. Instead of hitting the reset button during the upload process I did the following:

Don't have your micro plugged into a usb port. Have the arduino ide open with a simple bare minimum sketch, select the leonardo board (yes even if your using a micro). Press the reset button on your micro and hold, continue holding, and plug your board into a usb port. Continue holding the reset button and select upload the sketch. As soon as your ide window finishes compiling the sketch and begins the upload process release the reset button.


My results: The sketch loaded and my micro was continued to be recognized by the IDE program. Hiduino did a great job of explaining what was going on with the board. There are prob. several different ways to get your board recognized again this is simply the exact process I used to achieve my objective.


I also had this problem, but it was caused by a bad I2C connection. One of the I2C wires was pinched which provided a weak short to ground. (Actually the robot structure). This injected enough noise to mess with the micro and/or the USB driver. Some clues that differentiate this problem versus the others in this thread: 1. re-flashing with simple code such as Blink when in bootloader phase works, but when you put your application code back on, the problem resurfaces. 2. The problem only arises when you use the Wire library in your code. (which probably reconfigures those pins to be inputs).


So after some googling (and going forth and back to this page) my issue is very close to the one posted here, also the solution proposed by hiduino worked. But does this mean I ALWAYS have to hack-load the sketches? On the project I work, I wanted to switch from Uno to Micro but this issues is quite blocking.


FWIW: My Micro had a broken USB port. I never liked any USB port but this pico size socket on the Micro is scrap. When I bend down the plug with a little force or just bend it down through the breadboard and fix it in that position with a rubber the connection is fine. I noticed it after seeing the blue light flicker sometimes.


Tried a combination of a few things above, some got close to working but no avail. Had mine plugged into a hub, a decent one USB 3.0 and all and I suspect well-powered, but moving it to one of the system's direct USB port solved the problem for me.

3a8082e126
Reply all
Reply to author
Forward
0 new messages